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 56c61a3
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Octokit/Http/ProductHeaderValue.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -38,9 +40,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>

Check warning on line 49 in Octokit/Http/ProductHeaderValue.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

XML comment has a param tag for 'name', but there is no parameter by that name

Check warning on line 49 in Octokit/Http/ProductHeaderValue.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

XML comment has a param tag for 'name', but there is no parameter by that name

Check warning on line 49 in Octokit/Http/ProductHeaderValue.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

XML comment has a param tag for 'name', but there is no parameter by that name
public ProductHeaderValue(System.Net.Http.Headers.ProductHeaderValue productHeader)
{
_productHeaderValue = productHeader;
_productHeaderValue = productHeader ?? throw new ArgumentNullException(nameof(productHeader));
}

/// <summary>
Expand Down

0 comments on commit 56c61a3

Please sign in to comment.