Skip to content

Commit

Permalink
Allow the constructor for ProductHeaderValue to accept a framework …
Browse files Browse the repository at this point in the history
…version of the object
  • Loading branch information
Cyberboss committed Nov 24, 2023
1 parent 2e88736 commit 6f0945c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Octokit/Http/ProductHeaderValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,16 @@ public ProductHeaderValue(string name, string version)
{
}

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="name">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));

Check failure on line 50 in Octokit/Http/ProductHeaderValue.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

The type or namespace name 'ArgumentNullException' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 50 in Octokit/Http/ProductHeaderValue.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

The type or namespace name 'ArgumentNullException' could not be found (are you missing a using directive or an assembly reference?)
}

/// <summary>
Expand Down

0 comments on commit 6f0945c

Please sign in to comment.