diff --git a/Octokit/Http/ProductHeaderValue.cs b/Octokit/Http/ProductHeaderValue.cs index 2879adf940..6d8cd32258 100644 --- a/Octokit/Http/ProductHeaderValue.cs +++ b/Octokit/Http/ProductHeaderValue.cs @@ -1,4 +1,6 @@ -namespace Octokit +using System; + +namespace Octokit { /// /// Represents a product header value. This is used to generate the User Agent string sent with each request. The @@ -38,9 +40,16 @@ public ProductHeaderValue(string name, string version) { } - ProductHeaderValue(System.Net.Http.Headers.ProductHeaderValue productHeader) + /// + /// Initializes a new instance of the class. + /// + /// + /// See more information regarding User-Agent requirements here: https://developer.github.com/v3/#user-agent-required + /// + /// The . + public ProductHeaderValue(System.Net.Http.Headers.ProductHeaderValue productHeader) { - _productHeaderValue = productHeader; + _productHeaderValue = productHeader ?? throw new ArgumentNullException(nameof(productHeader)); } ///