mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-09 04:56:29 +00:00
Allow the constructor for ProductHeaderValue to accept a framework version of the object (#2821)
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
namespace Octokit
|
||||
using System;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a product header value. This is used to generate the User Agent string sent with each request. The
|
||||
@@ -38,9 +40,16 @@
|
||||
{
|
||||
}
|
||||
|
||||
ProductHeaderValue(System.Net.Http.Headers.ProductHeaderValue productHeader)
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ProductHeaderValue"/> class.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See more information regarding User-Agent requirements here: https://developer.github.com/v3/#user-agent-required
|
||||
/// </remarks>
|
||||
/// <param name="productHeader">The <see cref="System.Net.Http.Headers.ProductHeaderValue"/>.</param>
|
||||
public ProductHeaderValue(System.Net.Http.Headers.ProductHeaderValue productHeader)
|
||||
{
|
||||
_productHeaderValue = productHeader;
|
||||
_productHeaderValue = productHeader ?? throw new ArgumentNullException(nameof(productHeader));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user