Sdílet prostřednictvím


HttpContentCodingHeaderValueCollection Class

Definition

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

public ref class HttpContentCodingHeaderValueCollection sealed : IIterable<HttpContentCodingHeaderValue ^>, IVector<HttpContentCodingHeaderValue ^>, IStringable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class HttpContentCodingHeaderValueCollection final : IIterable<HttpContentCodingHeaderValue>, IVector<HttpContentCodingHeaderValue>, IStringable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class HttpContentCodingHeaderValueCollection final : IIterable<HttpContentCodingHeaderValue>, IVector<HttpContentCodingHeaderValue>, IStringable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class HttpContentCodingHeaderValueCollection : IEnumerable<HttpContentCodingHeaderValue>, IList<HttpContentCodingHeaderValue>, IStringable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class HttpContentCodingHeaderValueCollection : IEnumerable<HttpContentCodingHeaderValue>, IList<HttpContentCodingHeaderValue>, IStringable
Public NotInheritable Class HttpContentCodingHeaderValueCollection
Implements IEnumerable(Of HttpContentCodingHeaderValue), IList(Of HttpContentCodingHeaderValue), IStringable
Inheritance
Object Platform::Object IInspectable HttpContentCodingHeaderValueCollection
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

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

The HttpContentCodingHeaderValueCollection provides a collection container for instances of the HttpConnectionOptionHeaderValue class objects used for content encoding information in the Content-Encoding HTTP header.

The ContentEncoding property on the HttpContentHeaderCollection returns an HttpContentCodingHeaderValueCollection.

Collection member lists

For JavaScript, HttpContentCodingHeaderValueCollection has the members shown in the member lists. In addition, HttpContentCodingHeaderValueCollection supports members of Array.prototype and using an index to access items.

Enumerating the collection in C# or Microsoft Visual Basic

You can iterate through an HttpContentCodingHeaderValueCollection object in C# or Microsoft Visual Basic. In many cases, such as using foreach syntax, the compiler does this casting for you and you won't need to cast to IEnumerable<HttpContentCodingHeaderValue> explicitly. If you do need to cast explicitly, for example if you want to call GetEnumerator, cast the collection object to IEnumerable<T> with an HttpContentCodingHeaderValue constraint.

Properties

Size

Gets the number of HttpContentCodingHeaderValue objects in the collection.

Methods

Append(HttpContentCodingHeaderValue)

Adds a new HttpContentCodingHeaderValue item to the end of the collection.

Clear()

Removes all objects from the collection.

First()

Retrieves an iterator to the first HttpContentCodingHeaderValue item in the collection.

GetAt(UInt32)

Returns the HttpContentCodingHeaderValue at the specified index in the collection.

GetMany(UInt32, HttpContentCodingHeaderValue[])

Retrieves the HttpContentCodingHeaderValue items that start at the specified index in the collection.

GetView()

Returns an immutable view of the HttpContentCodingHeaderValueCollection.

IndexOf(HttpContentCodingHeaderValue, UInt32)

Retrieves the index of an HttpContentCodingHeaderValue in the collection.

InsertAt(UInt32, HttpContentCodingHeaderValue)

Inserts an HttpContentCodingHeaderValue into the collection at the specified index.

ParseAdd(String)

Parses and adds an entry to the HttpContentCodingHeaderValueCollection.

RemoveAt(UInt32)

Removes the entry at the specified index from the HttpContentCodingHeaderValueCollection.

RemoveAtEnd()

Removes the last HttpContentCodingHeaderValue item from the collection.

ReplaceAll(HttpContentCodingHeaderValue[])

Replaces all the HttpContentCodingHeaderValue items in the collection with the specified HttpContentCodingHeaderValue items.

SetAt(UInt32, HttpContentCodingHeaderValue)

Sets the HttpContentCodingHeaderValue at the specified index in the collection.

ToString()

Returns a string that represents the current HttpContentCodingHeaderValueCollection object.

TryParseAdd(String)

Tries to parse and add the specified item to the HttpContentCodingHeaderValueCollection.

Applies to

See also