Show / Hide Table of Contents

Class RangeHeader

This class encapsualtes a HTTP range

Inheritance
Object
RangeHeader
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Namespace:FubarDev.WebDavServer.Model.Headers
Assembly:FubarDev.WebDavServer.dll
Syntax
public class RangeHeader

Constructors

| Improve this Doc View Source

RangeHeader(String, RangeHeaderItem[])

Initializes a new instance of the RangeHeader class.

Declaration
public RangeHeader([NotNull] string unit, params RangeHeaderItem[] rangeItems)
Parameters
Type Name Description
String unit

The unit of the range (currently only bytes is allowed)

RangeHeaderItem[] rangeItems

The HTTP range items for this range

Properties

| Improve this Doc View Source

RangeItems

Gets the HTTP range items

Declaration
[NotNull]
public IReadOnlyCollection<RangeHeaderItem> RangeItems { get; }
Property Value
Type Description
IReadOnlyCollection<RangeHeaderItem>
| Improve this Doc View Source

Unit

Gets the unit for this HTTP range

Declaration
[NotNull]
public string Unit { get; }
Property Value
Type Description
String

Methods

| Improve this Doc View Source

Normalize(Int64)

Normalize all byte ranges using the specified totalLength

Declaration
[NotNull]
public IReadOnlyList<NormalizedRangeItem> Normalize(long totalLength)
Parameters
Type Name Description
Int64 totalLength

The length of the resource

Returns
Type Description
IReadOnlyList<NormalizedRangeItem>

The list of normalized byte ranges

| Improve this Doc View Source

Parse(IEnumerable<String>)

Parses the ranges into a new RangeHeader instance

Declaration
[NotNull]
public static RangeHeader Parse([NotNull, ItemNotNull] IEnumerable<string> ranges)
Parameters
Type Name Description
IEnumerable<String> ranges

The ranges to parse

Returns
Type Description
RangeHeader

The new RangeHeader

Remarks

The range must be in the form unit=(range)+

| Improve this Doc View Source

Parse(String)

Parses a range into a new RangeHeader instance

Declaration
[NotNull]
public static RangeHeader Parse([NotNull] string range)
Parameters
Type Name Description
String range

The range to parse

Returns
Type Description
RangeHeader

The new RangeHeader

Remarks

The range must be in the form unit=(range)+

| Improve this Doc View Source

ToString()

Returns the textual representation of this range.

Declaration
public override string ToString()
Returns
Type Description
String

The textual representation of this range

Overrides
Object.ToString()
Remarks

The return value of this function can be parsed using Parse(String).

| Improve this Doc View Source

ToString(RangeHeaderItem)

Returns the textual representation of a single RangeHeaderItem

Declaration
[NotNull]
public virtual string ToString(RangeHeaderItem rangeItem)
Parameters
Type Name Description
RangeHeaderItem rangeItem

The RangeHeaderItem to get the textual representation for

Returns
Type Description
String

The textual representation of rangeItem

Remarks

The return value of this function looks like unit range/length

| Improve this Doc View Source

ToString(RangeHeaderItem, Nullable<Int64>)

Returns the textual representation of a single RangeHeaderItem

Declaration
[NotNull]
public virtual string ToString(RangeHeaderItem rangeItem, long ? length)
Parameters
Type Name Description
RangeHeaderItem rangeItem

The RangeHeaderItem to get the textual representation for

Nullable<Int64> length

The length value to be used in the textual representation

Returns
Type Description
String

The textual representation of rangeItem

Remarks

The return value of this function looks like unit range/length

  • Improve this Doc
  • View Source
Back to top Copyright © 2016-2017 Fubar Development Junker
Generated by DocFX