IHeaderDictionary IHeaderDictionary IHeaderDictionary Interface

Definition

Represents HttpRequest and HttpResponse headers

public interface IHeaderDictionary : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,Microsoft.Extensions.Primitives.StringValues>>, System.Collections.Generic.IDictionary<string,Microsoft.Extensions.Primitives.StringValues>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Microsoft.Extensions.Primitives.StringValues>>
type IHeaderDictionary = interface
    interface IDictionary<string, StringValues>
    interface ICollection<KeyValuePair<string, StringValues>>
    interface seq<KeyValuePair<string, StringValues>>
    interface IEnumerable
Public Interface IHeaderDictionary
Implements ICollection(Of KeyValuePair(Of String, StringValues)), IDictionary(Of String, StringValues), IEnumerable(Of KeyValuePair(Of String, StringValues))
Derived
Implements

Properties

ContentLength ContentLength ContentLength

Strongly typed access to the Content-Length header. Implementations must keep this in sync with the string representation.

Item[String] Item[String] Item[String]

IHeaderDictionary has a different indexer contract than IDictionary, where it will return StringValues.Empty for missing entries.

Extension Methods

Append(IHeaderDictionary, String, StringValues) Append(IHeaderDictionary, String, StringValues) Append(IHeaderDictionary, String, StringValues)

Add new values. Each item remains a separate array entry.

AppendCommaSeparatedValues(IHeaderDictionary, String, String[]) AppendCommaSeparatedValues(IHeaderDictionary, String, String[]) AppendCommaSeparatedValues(IHeaderDictionary, String, String[])

Quotes any values containing commas, and then comma joins all of the values with any existing values.

GetCommaSeparatedValues(IHeaderDictionary, String) GetCommaSeparatedValues(IHeaderDictionary, String) GetCommaSeparatedValues(IHeaderDictionary, String)

Get the associated values from the collection separated into individual values. Quoted values will not be split, and the quotes will be removed.

SetCommaSeparatedValues(IHeaderDictionary, String, String[]) SetCommaSeparatedValues(IHeaderDictionary, String, String[]) SetCommaSeparatedValues(IHeaderDictionary, String, String[])

Quotes any values containing commas, and then comma joins all of the values.

AppendList<T>(IHeaderDictionary, String, IList<T>) AppendList<T>(IHeaderDictionary, String, IList<T>) AppendList<T>(IHeaderDictionary, String, IList<T>)

Applies to