HttpContentRangeHeaderValue HttpContentRangeHeaderValue HttpContentRangeHeaderValue Class

Definition

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

public sealed class HttpContentRangeHeaderValue : IStringable, IHttpContentRangeHeaderValuepublic sealed class HttpContentRangeHeaderValue : IStringable, IHttpContentRangeHeaderValuePublic NotInheritable Class HttpContentRangeHeaderValue Implements IStringable, IHttpContentRangeHeaderValue
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

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

HttpContentRangeHeaderValue(UInt64) HttpContentRangeHeaderValue(UInt64) HttpContentRangeHeaderValue(UInt64)

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

public HttpContentRangeHeaderValue(UInt64 length)public HttpContentRangeHeaderValue(UInt64 length)Public Sub New(length As UInt64)
Parameters
length
System.UInt64 System.UInt64 System.UInt64

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

Attributes

HttpContentRangeHeaderValue(UInt64, UInt64) HttpContentRangeHeaderValue(UInt64, UInt64) HttpContentRangeHeaderValue(UInt64, UInt64)

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

public HttpContentRangeHeaderValue(UInt64 from, UInt64 to)public HttpContentRangeHeaderValue(UInt64 from, UInt64 to)Public Sub New(from As UInt64, to As UInt64)
Parameters
from
System.UInt64 System.UInt64 System.UInt64

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

to
System.UInt64 System.UInt64 System.UInt64

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

Attributes

HttpContentRangeHeaderValue(UInt64, UInt64, UInt64) HttpContentRangeHeaderValue(UInt64, UInt64, UInt64) HttpContentRangeHeaderValue(UInt64, UInt64, UInt64)

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

public HttpContentRangeHeaderValue(UInt64 from, UInt64 to, UInt64 length)public HttpContentRangeHeaderValue(UInt64 from, UInt64 to, UInt64 length)Public Sub New(from As UInt64, to As UInt64, length As UInt64)
Parameters
from
System.UInt64 System.UInt64 System.UInt64

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

to
System.UInt64 System.UInt64 System.UInt64

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

length
System.UInt64 System.UInt64 System.UInt64

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

Attributes

Properties

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>
Value

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

Attributes

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>
Value

The position at which to stop sending data.

Attributes

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>
Value

The length of the full content entity body.

Attributes

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
Value
string string string

The range units used.

Attributes

Remarks

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

Methods

Parse(String) Parse(String) Parse(String)

Converts a string to an HttpContentRangeHeaderValue instance.

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

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

Returns
Attributes

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

A string that represents the current object.

Attributes

TryParse(String, HttpContentRangeHeaderValue) TryParse(String, HttpContentRangeHeaderValue) TryParse(String, HttpContentRangeHeaderValue)

Determines whether a string is valid HttpContentRangeHeaderValue information.

public static bool TryParse(String input, HttpContentRangeHeaderValue contentRangeHeaderValue)public static bool TryParse(String input, HttpContentRangeHeaderValue contentRangeHeaderValue)Public Static Function TryParse(input As String, contentRangeHeaderValue As HttpContentRangeHeaderValue) As bool
Parameters
input
System.String System.String System.String

The string to validate.

Returns
bool bool bool

true if input is valid HttpContentRangeHeaderValue information; otherwise, false.

Attributes