HttpProductHeaderValue HttpProductHeaderValue HttpProductHeaderValue HttpProductHeaderValue Class

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

Syntax

Declaration

public sealed class HttpProductHeaderValuepublic sealed class HttpProductHeaderValuePublic NotInheritable Class HttpProductHeaderValue

Constructors summary

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

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

Properties summary

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

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

Methods summary

Converts a string to an HttpProductHeaderValue instance.

Returns a string that represents the current HttpProductHeaderValue object.

Determines whether a string is valid HttpProductHeaderValue information.

Constructors

  • HttpProductHeaderValue(System.String)
    HttpProductHeaderValue(System.String)
    HttpProductHeaderValue(System.String)
    HttpProductHeaderValue(System.String)

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

    public HttpProductHeaderValue(System.String)public HttpProductHeaderValue(System.String)Public Function HttpProductHeaderValue(System.String) As

    Parameters

    • productName
      System.String
      System.String
      System.String
      System.String

      The name of the product token used in the User-Agent HTTP header.

  • HttpProductHeaderValue(System.String,System.String)
    HttpProductHeaderValue(System.String,System.String)
    HttpProductHeaderValue(System.String,System.String)
    HttpProductHeaderValue(System.String,System.String)

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

    public HttpProductHeaderValue(System.String,System.String)public HttpProductHeaderValue(System.String,System.String)Public Function HttpProductHeaderValue(System.String,System.String) As

    Parameters

    • productName
      System.String
      System.String
      System.String
      System.String

      The name of the product token used in the User-Agent HTTP header.

    • productVersion
      System.String
      System.String
      System.String
      System.String

      The version of the product token used in the User-Agent HTTP header.

Properties

  • Name
    Name
    Name
    Name

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

    public string Name { get; }public string Name { get; }Public ReadOnly Property Name As string

    Property Value

    • string
      string
      string
      string

      The name of the product token

  • Version
    Version
    Version
    Version

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

    public string Version { get; }public string Version { get; }Public ReadOnly Property Version As string

    Property Value

    • string
      string
      string
      string

      The version of the product token.

Methods

  • Parse(System.String)
    Parse(System.String)
    Parse(System.String)
    Parse(System.String)

    Converts a string to an HttpProductHeaderValue instance.

    public static HttpProductHeaderValue Parse(System.String)public static HttpProductHeaderValue Parse(System.String)Public Static Function Parse(System.String) As HttpProductHeaderValue

    Parameters

    • input
      System.String
      System.String
      System.String
      System.String

      A string that represents the product name and version.

    Returns

  • ToString()
    ToString()
    ToString()
    ToString()

    Returns a string that represents the current HttpProductHeaderValue object.

    public string ToString()public string ToString()Public Function ToString() As string

    Returns

    • string
      string
      string
      string

      A string that represents the current object.

  • TryParse(System.String,Windows.Web.Http.Headers.HttpProductHeaderValue)
    TryParse(System.String,Windows.Web.Http.Headers.HttpProductHeaderValue)
    TryParse(System.String,Windows.Web.Http.Headers.HttpProductHeaderValue)
    TryParse(System.String,Windows.Web.Http.Headers.HttpProductHeaderValue)

    Determines whether a string is valid HttpProductHeaderValue information.

    public static bool TryParse(System.String,Windows.Web.Http.Headers.HttpProductHeaderValue)public static bool TryParse(System.String,Windows.Web.Http.Headers.HttpProductHeaderValue)Public Static Function TryParse(System.String,Windows.Web.Http.Headers.HttpProductHeaderValue) As bool

    Parameters

    Returns

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.Web.Http.Headers.dll