diff --git a/Octokit/Http/ProductHeaderValue.cs b/Octokit/Http/ProductHeaderValue.cs index f1416172..64008c3e 100644 --- a/Octokit/Http/ProductHeaderValue.cs +++ b/Octokit/Http/ProductHeaderValue.cs @@ -1,14 +1,31 @@ namespace Octokit { + /// + /// Represents a product header value. This is used to generate the User Agent string sent with each request. The + /// name used should represent the product that's using Octokit.net. + /// + /// + /// This class is a wrapper around + /// so that consumers of Octokit.net would not have to add a reference to the System.Net.Http.Headers namespace. + /// public class ProductHeaderValue { readonly System.Net.Http.Headers.ProductHeaderValue _productHeaderValue; + /// + /// Initializes a new instance of the class. + /// + /// The name of the product that's using Octokit public ProductHeaderValue(string name) : this(new System.Net.Http.Headers.ProductHeaderValue(name)) { } + /// + /// Initializes a new instance of the class. + /// + /// The name of the product that's using Octokit + /// The version of the product that's using Octokit public ProductHeaderValue(string name, string version) : this(new System.Net.Http.Headers.ProductHeaderValue(name, version)) { @@ -19,11 +36,17 @@ _productHeaderValue = productHeader; } + /// + /// The name of the product that's using Octokit + /// public string Name { get { return _productHeaderValue.Name; } } + /// + /// Gets the version of the product. + /// public string Version { get { return _productHeaderValue.Version; } @@ -44,11 +67,22 @@ return _productHeaderValue.ToString(); } + /// + /// Parses a string in the format "foo" or "foo/1.0" and returns the corresponding + /// instance. + /// + /// The input. public static ProductHeaderValue Parse(string input) { return new ProductHeaderValue(System.Net.Http.Headers.ProductHeaderValue.Parse(input)); } + /// + /// Parses a string in the format "foo" or "foo/1.0" and returns the corresponding + /// instance via an out parameter. + /// + /// The input. + /// The parsed value. public static bool TryParse(string input, out ProductHeaderValue parsedValue) {