System::Net::Http::Headers::ContentRangeHeaderValue 类

ContentRangeHeaderValue class

表示 ‘Content-Range’ 标头的值。此类的对象只能使用 System::MakeObject() 函数分配。切勿在栈上或使用 operator new 创建此类型的实例,因为这会导致运行时错误和/或断言故障。始终将此类包装在 System::SmartPtr 指针中,并使用该指针将其作为参数传递给函数。

class ContentRangeHeaderValue : public System::ICloneable

方法

方法描述
ContentRangeHeaderValue(int64_t, int64_t, int64_t)构造一个新实例。
ContentRangeHeaderValue(int64_t)构造一个新实例。
ContentRangeHeaderValue(int64_t, int64_t)构造一个新实例。
Equals(System::SharedPtr<Object>) override使用 C# Object.Equals 语义比较对象。
get_From()获取数据发送必须开始的位置。
get_HasLength() const获取一个值,指示当前标头是否已指定长度。
get_HasRange() const获取一个值,用于指示当前标头是否已指定范围。
get_Length()获取实体主体的长度。
get_To()获取数据发送必须停止的位置。
get_Unit()RTTI 信息。
static GetContentRangeLength(String, int32_t, System::SharedPtr<Object>&)将传入的字符串从指定位置转换为 ContentRangeHeaderValue 类的实例。
GetHashCode() const override相当于 C# Object.GetHashCode() 方法。启用自定义对象的哈希计算。
static Parse(String)将传入的字符串转换为 ContentRangeHeaderValue 类的实例。
set_Unit(String)设置范围中使用的单位。
ToString() const override相当于 C# 的 Object.ToString() 方法。用于将自定义对象转换为字符串。
static TryParse(String, System::SharedPtr<ContentRangeHeaderValue>&)尝试将传入的字符串转换为 ContentRangeHeaderValue 类的实例。

另见