Allow the constructor for ProductHeaderValue to accept a framework version of the object (#2821)

This commit is contained in:
Jordan Dominion
2023-12-11 13:08:02 -05:00
committed by GitHub
parent 2e88736037
commit 964400061d
+12 -3
View File
@@ -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>