Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

HttpProductHeaderValue Class

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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

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

Constructors

Name Description
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 Description
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

Name Description
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


Feedback

Was this page helpful?