HeaderDictionary Class

 

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

Namespace:   Microsoft.Owin
Assembly:  Microsoft.Owin (in Microsoft.Owin.dll)

Inheritance Hierarchy

System.Object
  Microsoft.Owin.HeaderDictionary

Syntax

public class HeaderDictionary : IHeaderDictionary, IReadableStringCollection, 
    IDictionary<string, string[]>, ICollection<KeyValuePair<string, string[]>>, 
    IEnumerable<KeyValuePair<string, string[]>>, IEnumerable
public ref class HeaderDictionary : IHeaderDictionary, IReadableStringCollection, 
    IDictionary<String^, array<String^>^>, ICollection<KeyValuePair<String^, array<String^>^>>, 
    IEnumerable<KeyValuePair<String^, array<String^>^>>, IEnumerable
type HeaderDictionary = 
    class
        interface IHeaderDictionary
        interface IReadableStringCollection
        interface IDictionary<string, string[]>
        interface ICollection<KeyValuePair<string, string[]>>
        interface IEnumerable<KeyValuePair<string, string[]>>
        interface IEnumerable
    end
Public Class HeaderDictionary
    Implements IHeaderDictionary, IReadableStringCollection, IDictionary(Of String, String()),
    ICollection(Of KeyValuePair(Of String, String())), IEnumerable(Of KeyValuePair(Of String, String())),
    IEnumerable

Constructors

Name Description
System_CAPS_pubmethod HeaderDictionary(IDictionary<String, String[]>)

Initializes a new instance of the HeaderDictionary class.

Properties

Name Description
System_CAPS_pubproperty Count

Gets the number of elements contained in the HeaderDictionary ;.

System_CAPS_pubproperty IsReadOnly

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

System_CAPS_pubproperty Item[String]

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

System_CAPS_pubproperty Keys

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

System_CAPS_pubproperty Values

Gets the attribute value.

Methods

Name Description
System_CAPS_pubmethod Add(KeyValuePair<String, String[]>)

Adds a new list of items to the collection.

System_CAPS_pubmethod Add(String, String[])

Adds the given header and values to the collection.

System_CAPS_pubmethod Append(String, String)

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

System_CAPS_pubmethod AppendCommaSeparatedValues(String, String[])

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

System_CAPS_pubmethod AppendValues(String, String[])

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

System_CAPS_pubmethod Clear()

Clears the entire list of objects.

System_CAPS_pubmethod Contains(KeyValuePair<String, String[]>)

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

System_CAPS_pubmethod ContainsKey(String)

Determines whether the HeaderDictionary contains a specific key.

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

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

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod Get(String)

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

System_CAPS_pubmethod 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.

System_CAPS_pubmethod GetEnumerator()

Returns an enumerator that iterates through a collection.

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod GetValues(String)

Get the associated values from the collection without modification.

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod Remove(KeyValuePair<String, String[]>)

Removes the given item from the the collection.

System_CAPS_pubmethod Remove(String)

Removes the given header from the collection.

System_CAPS_pubmethod Set(String, String)

Sets a specific header value.

System_CAPS_pubmethod SetCommaSeparatedValues(String, String[])

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

System_CAPS_pubmethod SetValues(String, String[])

Sets the specified header values without modification.

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod TryGetValue(String, String[])

Retrieves a value from the dictionary.

Explicit Interface Implementations

Name Description
System_CAPS_pubinterfaceSystem_CAPS_privmethod IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.Owin Namespace

Return to top