HttpContentRangeHeaderValue HttpContentRangeHeaderValue HttpContentRangeHeaderValue HttpContentRangeHeaderValue Class

Represents the value of the Content-Range HTTP header on HTTP content in a request or a response.

Syntax

Declaration

public sealed class HttpContentRangeHeaderValuepublic sealed class HttpContentRangeHeaderValuePublic NotInheritable Class HttpContentRangeHeaderValue

Remarks

The HttpContentRangeHeaderValue class represents the value of the Content-Range HTTP header on HTTP content sent in an HTTP request or received in an response.

The ContentRange property on the HttpContentHeaderCollection returns an HttpContentRangeHeaderValue object.

Constructors summary

Initializes a new instance of the HttpContentRangeHeaderValue class with a content length.

Initializes a new instance of the HttpContentRangeHeaderValue class with a start and stop position.

Initializes a new instance of the HttpContentRangeHeaderValue class with a start and stop position and a content length.

Properties summary

Gets the position at which to start sending data in the Content-Range HTTP header.

Gets the position at which to stop sending data in the Content-Range HTTP header.

Gets the length of the full content entity body in the Content-Range HTTP header.

Gets or sets the value of the range units used in the Content-Range HTTP header.

Methods summary

Converts a string to an HttpContentRangeHeaderValue instance.

Returns a string that represents the current HttpContentRangeHeaderValue object.

Determines whether a string is valid HttpContentRangeHeaderValue information.

Constructors

  • HttpContentRangeHeaderValue(System.UInt64)
    HttpContentRangeHeaderValue(System.UInt64)
    HttpContentRangeHeaderValue(System.UInt64)
    HttpContentRangeHeaderValue(System.UInt64)

    Initializes a new instance of the HttpContentRangeHeaderValue class with a content length.

    public HttpContentRangeHeaderValue(System.UInt64 length)public HttpContentRangeHeaderValue(System.UInt64 length)Public Function HttpContentRangeHeaderValue(length As System.UInt64) As

    Parameters

    • length
      System.UInt64
      System.UInt64
      System.UInt64
      System.UInt64

      The length, in bytes, of the full content entity body.

  • HttpContentRangeHeaderValue(System.UInt64,System.UInt64)
    HttpContentRangeHeaderValue(System.UInt64,System.UInt64)
    HttpContentRangeHeaderValue(System.UInt64,System.UInt64)
    HttpContentRangeHeaderValue(System.UInt64,System.UInt64)

    Initializes a new instance of the HttpContentRangeHeaderValue class with a start and stop position.

    public HttpContentRangeHeaderValue(System.UInt64 from,System.UInt64 to)public HttpContentRangeHeaderValue(System.UInt64 from,System.UInt64 to)Public Function HttpContentRangeHeaderValue(from As System.UInt64,to As System.UInt64) As

    Parameters

    • from
      System.UInt64
      System.UInt64
      System.UInt64
      System.UInt64

      The position, in bytes, at which to start sending data.

    • to
      System.UInt64
      System.UInt64
      System.UInt64
      System.UInt64

      The position, in bytes, at which to stop sending data.

  • HttpContentRangeHeaderValue(System.UInt64,System.UInt64,System.UInt64)
    HttpContentRangeHeaderValue(System.UInt64,System.UInt64,System.UInt64)
    HttpContentRangeHeaderValue(System.UInt64,System.UInt64,System.UInt64)
    HttpContentRangeHeaderValue(System.UInt64,System.UInt64,System.UInt64)

    Initializes a new instance of the HttpContentRangeHeaderValue class with a start and stop position and a content length.

    public HttpContentRangeHeaderValue(System.UInt64 from,System.UInt64 to,System.UInt64 length)public HttpContentRangeHeaderValue(System.UInt64 from,System.UInt64 to,System.UInt64 length)Public Function HttpContentRangeHeaderValue(from As System.UInt64,to As System.UInt64,length As System.UInt64) As

    Parameters

    • from
      System.UInt64
      System.UInt64
      System.UInt64
      System.UInt64

      The position, in bytes, at which to start sending data.

    • to
      System.UInt64
      System.UInt64
      System.UInt64
      System.UInt64

      The position, in bytes, at which to stop sending data.

    • length
      System.UInt64
      System.UInt64
      System.UInt64
      System.UInt64

      The length, in bytes, of the full content entity body.

Properties

  • FirstBytePosition
    FirstBytePosition
    FirstBytePosition
    FirstBytePosition

    Gets the position at which to start sending data in the Content-Range HTTP header.

    public IReference<ulong> FirstBytePosition { get; }public IReference<ulong> FirstBytePosition { get; }Public ReadOnly Property FirstBytePosition As IReference<ulong>

    Property Value

    • The position, in bytes, at which to start sending data.

  • LastBytePosition
    LastBytePosition
    LastBytePosition
    LastBytePosition

    Gets the position at which to stop sending data in the Content-Range HTTP header.

    public IReference<ulong> LastBytePosition { get; }public IReference<ulong> LastBytePosition { get; }Public ReadOnly Property LastBytePosition As IReference<ulong>

    Property Value

    • The position at which to stop sending data.

  • Length
    Length
    Length
    Length

    Gets the length of the full content entity body in the Content-Range HTTP header.

    public IReference<ulong> Length { get; }public IReference<ulong> Length { get; }Public ReadOnly Property Length As IReference<ulong>

    Property Value

    • The length of the full content entity body.

  • Unit
    Unit
    Unit
    Unit

    Gets or sets the value of the range units used in the Content-Range HTTP header.

    public string Unit { get; set; }public string Unit { get; set; }Public ReadWrite Property Unit As string

    Property Value

    • string
      string
      string
      string

      The range units used.

    Remarks

    The only range unit defined by HTTP/1.1 is "bytes".

Methods

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

    Converts a string to an HttpContentRangeHeaderValue instance.

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

    Parameters

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

      A string that represents the content range information in the Content-Range HTTP header.

    Returns

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

    Returns a string that represents the current HttpContentRangeHeaderValue 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.HttpContentRangeHeaderValue)
    TryParse(System.String,Windows.Web.Http.Headers.HttpContentRangeHeaderValue)
    TryParse(System.String,Windows.Web.Http.Headers.HttpContentRangeHeaderValue)
    TryParse(System.String,Windows.Web.Http.Headers.HttpContentRangeHeaderValue)

    Determines whether a string is valid HttpContentRangeHeaderValue information.

    public static bool TryParse(System.String input,Windows.Web.Http.Headers.HttpContentRangeHeaderValue contentRangeHeaderValue)public static bool TryParse(System.String input,Windows.Web.Http.Headers.HttpContentRangeHeaderValue contentRangeHeaderValue)Public Static Function TryParse(input As System.String,contentRangeHeaderValue As Windows.Web.Http.Headers.HttpContentRangeHeaderValue) 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.ContractVersionAttribute
Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ThreadingAttribute

Details

Assembly

Windows.Web.Http.Headers.dll