HeaderDictionary Class

Definition

Represents a wrapper for owin.RequestHeaders and owin.ResponseHeaders.

public class HeaderDictionary : Microsoft.Owin.IHeaderDictionary, System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,string[]>>, System.Collections.Generic.IDictionary<string,string[]>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,string[]>>
type HeaderDictionary = class
    interface IHeaderDictionary
    interface IReadableStringCollection
    interface seq<KeyValuePair<string, string[]>>
    interface IEnumerable
    interface IDictionary<string, string[]>
    interface ICollection<KeyValuePair<string, string[]>>
Public Class HeaderDictionary
Implements ICollection(Of KeyValuePair(Of String, String())), IDictionary(Of String, String()), IEnumerable(Of KeyValuePair(Of String, String())), IHeaderDictionary
Inheritance
HeaderDictionary
Implements

Constructors

HeaderDictionary(IDictionary<String,String[]>)

Initializes a new instance of the HeaderDictionary class.

Properties

Count

Gets the number of elements contained in the HeaderDictionary;.

IsReadOnly

Gets a value that indicates whether the HeaderDictionary is in read-only mode.

Item[String]

Get or sets the associated value from the collection as a single string.

Keys

Gets an ICollection that contains the keys in the HeaderDictionary;.

Values

Methods

Add(KeyValuePair<String,String[]>)

Adds a new list of items to the collection.

Add(String, String[])

Adds the given header and values to the collection.

Append(String, String)

Add a new value. Appends to the header if already present

AppendCommaSeparatedValues(String, String[])

Quotes any values containing comas, and then coma joins all of the values with any existing values.

AppendValues(String, String[])

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

Clear()

Clears the entire list of objects.

Contains(KeyValuePair<String,String[]>)

Returns a value indicating whether the specified object occurs within this collection.

ContainsKey(String)

Determines whether the HeaderDictionary contains a specific key.

CopyTo(KeyValuePair<String,String[]>[], Int32)

Copies the HeaderDictionary elements to a one-dimensional Array instance at the specified index.

Get(String)

Get the associated value from the collection as a single string.

GetCommaSeparatedValues(String)

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

GetEnumerator()

Returns an enumerator that iterates through a collection.

GetValues(String)

Get the associated values from the collection without modification.

Remove(KeyValuePair<String,String[]>)

Removes the given item from the the collection.

Remove(String)

Removes the given header from the collection.

Set(String, String)

Sets a specific header value.

SetCommaSeparatedValues(String, String[])

Quotes any values containing comas, and then coma joins all of the values.

SetValues(String, String[])

Sets the specified header values without modification.

TryGetValue(String, String[])

Retrieves a value from the dictionary.

Explicit Interface Implementations

IDictionary<String,String[]>.Item[String]

Throws KeyNotFoundException if the key is not present.

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

Applies to