HttpContentRangeHeaderValue
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// You can use this class in JavaScript.
- Attributes
| 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) HttpContentRangeHeaderValue(UInt64)
Initializes a new instance of the HttpContentRangeHeaderValue class with a content length.
public : HttpContentRangeHeaderValue(unsigned __int64 length)public HttpContentRangeHeaderValue(UInt64 length)Public Sub New(length As UInt64)// You can use this method in JavaScript.
- length
- unsigned __int64 UInt64 UInt64 UInt64
The length, in bytes, of the full content entity body.
HttpContentRangeHeaderValue(UInt64, UInt64) 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(unsigned __int64 from, unsigned __int64 to)public HttpContentRangeHeaderValue(UInt64 from, UInt64 to)Public Sub New(from As UInt64, to As UInt64)// You can use this method in JavaScript.
- from
- unsigned __int64 UInt64 UInt64 UInt64
The position, in bytes, at which to start sending data.
- to
- unsigned __int64 UInt64 UInt64 UInt64
The position, in bytes, at which to stop sending data.
HttpContentRangeHeaderValue(UInt64, UInt64, UInt64) 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(unsigned __int64 from, unsigned __int64 to, unsigned __int64 length)public HttpContentRangeHeaderValue(UInt64 from, UInt64 to, UInt64 length)Public Sub New(from As UInt64, to As UInt64, length As UInt64)// You can use this method in JavaScript.
- from
- unsigned __int64 UInt64 UInt64 UInt64
The position, in bytes, at which to start sending data.
- to
- unsigned __int64 UInt64 UInt64 UInt64
The position, in bytes, at which to stop sending data.
- length
- unsigned __int64 UInt64 UInt64 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 Nullable<ulong> FirstBytePosition { get; }Public ReadOnly Property FirstBytePosition As Nullable<ulong>// You can use this property in JavaScript.
- Value
- IReference<ulong> Nullable<ulong> Nullable<ulong> Nullable<ulong>
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 Nullable<ulong> LastBytePosition { get; }Public ReadOnly Property LastBytePosition As Nullable<ulong>// You can use this property in JavaScript.
- Value
- IReference<ulong> Nullable<ulong> Nullable<ulong> Nullable<ulong>
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 Nullable<ulong> Length { get; }Public ReadOnly Property Length As Nullable<ulong>// You can use this property in JavaScript.
- Value
- IReference<ulong> Nullable<ulong> Nullable<ulong> Nullable<ulong>
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 : PlatForm::String Unit { get; set; }public string Unit { get; set; }Public ReadWrite Property Unit As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The range units used.
Remarks
The only range unit defined by HTTP/1.1 is "bytes".
Methods
Parse(String) Parse(String) Parse(String) Parse(String)
Converts a string to an HttpContentRangeHeaderValue instance.
public : static HttpContentRangeHeaderValue Parse(PlatForm::String input)public static HttpContentRangeHeaderValue Parse(String input)Public Static Function Parse(input As String) As HttpContentRangeHeaderValue// You can use this method in JavaScript.
- input
- PlatForm::String String String String
A string that represents the content range information in the Content-Range HTTP header.
An HttpContentRangeHeaderValue instance.
Remarks
Below are the exceptions that this function throws.
E_INVALIDARG
The input parameter is null (Nothing in Visual Basic).
The input parameter is not valid content range information.
ToString() ToString() ToString() ToString()
Returns a string that represents the current HttpContentRangeHeaderValue object.
public : PlatForm::String ToString()public string ToString()Public Function ToString() As string// You can use this method in JavaScript.
A string that represents the current object.
TryParse(String, HttpContentRangeHeaderValue) TryParse(String, HttpContentRangeHeaderValue) TryParse(String, HttpContentRangeHeaderValue) TryParse(String, HttpContentRangeHeaderValue)
Determines whether a string is valid HttpContentRangeHeaderValue information.
public : static PlatForm::Boolean TryParse(PlatForm::String input, HttpContentRangeHeaderValue contentRangeHeaderValue)public static bool TryParse(String input, HttpContentRangeHeaderValue contentRangeHeaderValue)Public Static Function TryParse(input As String, contentRangeHeaderValue As HttpContentRangeHeaderValue) As bool// You can use this method in JavaScript.
- input
- PlatForm::String String String String
The string to validate.
- contentRangeHeaderValue
- HttpContentRangeHeaderValue HttpContentRangeHeaderValue HttpContentRangeHeaderValue HttpContentRangeHeaderValue
The HttpContentRangeHeaderValue version of the string.
true if input is valid HttpContentRangeHeaderValue information; otherwise, false.