Share via


HttpProductHeaderValue Class

Definition

Represents product information used by the HttpProductHeaderValue and HttpProductInfoHeaderValueCollection classes in the User-Agent HTTP header.

public ref class HttpProductHeaderValue sealed : IStringable
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Http.Headers.IHttpProductHeaderValueFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class HttpProductHeaderValue final : IStringable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Http.Headers.IHttpProductHeaderValueFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class HttpProductHeaderValue final : IStringable
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Http.Headers.IHttpProductHeaderValueFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class HttpProductHeaderValue : IStringable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Http.Headers.IHttpProductHeaderValueFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class HttpProductHeaderValue : IStringable
function HttpProductHeaderValue(productName, productVersion)
Public NotInheritable Class HttpProductHeaderValue
Implements IStringable
Inheritance
Object Platform::Object IInspectable HttpProductHeaderValue
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Constructors

HttpProductHeaderValue(String, String)

Initializes a new instance of the HttpProductHeaderValue class with a product name and a product version.

HttpProductHeaderValue(String)

Initializes a new instance of the HttpProductHeaderValue class with a product name.

Properties

Name

Gets a token that represents the name of the product to be used in the User-Agent HTTP header.

Version

Gets a token that represents the version of the product to be used in the User-Agent HTTP header.

Methods

Parse(String)

Converts a string to an HttpProductHeaderValue instance.

ToString()

Returns a string that represents the current HttpProductHeaderValue object.

TryParse(String, HttpProductHeaderValue)

Determines whether a string is valid HttpProductHeaderValue information.

Applies to

See also