HeaderDictionary Class

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

Inheritance Hierarchy

System.Object
  Microsoft.Owin.HeaderDictionary

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

Syntax

'Declaration
Public Class HeaderDictionary _
    Implements IHeaderDictionary, IReadableStringCollection, IDictionary(Of String, String()),  _
    ICollection(Of KeyValuePair(Of String, String())),  _
    IEnumerable(Of KeyValuePair(Of String, String())),  _
    IEnumerable
'Usage
Dim instance As HeaderDictionary
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<String, String[]>, ICollection<KeyValuePair<String, String[]>>, IEnumerable<KeyValuePair<String, String[]>>, IEnumerable

The HeaderDictionary type exposes the following members.

Constructors

  Name Description
Public method HeaderDictionary Initializes a new instance of the HeaderDictionary class.

Top

Properties

  Name Description
Public property Count Gets the number of elements contained in the HeaderDictionary.
Public property IsReadOnly Gets a value that indicates whether the HeaderDictionary is in read-only mode.
Public property Item Get or set the associated header value in the collection. Multiple values will be merged. Returns null if the key is not present.
Public property Keys Gets an ICollection that contains the keys in the HeaderDictionary.
Public property Values Gets the attribute value.

Top

Methods

  Name Description
Public method Add(KeyValuePair<String, array<String[]>) Adds a new list of items in the collection.
Public method Add(String, array<String[]) Adds a new list of items in the collection.
Public method Append Adds a new value. Appends to the header if already present.
Public method AppendCommaSeparatedValues Quotes any values containing comas, and then coma joins all of the values with any existing values.
Public method AppendValues Adds new values. Each item remains a separate array entry.
Public method Clear Clears the entire list of objects.
Public method Contains Returns a value indicating whether the specified object occurs within this collection.
Public method ContainsKey Determines whether the HeaderDictionary contains a specific key.
Public method CopyTo Copies the HeaderDictionary elements to a one-dimensional Array instance at the specified index.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method Get Gets the associated value from the collection.
Public method GetCommaSeparatedValues Parses out comma separated headers into individual values.
Public method GetEnumerator Returns an enumerator that iterates through a collection.
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public method GetValues Gets the associated values from the collection in their original format. Returns null if the key is not present.
Protected method MemberwiseClone (Inherited from Object.)
Public method Remove(KeyValuePair<String, array<String[]>) Indicates whether the specified object can be removed in the collection.
Public method Remove(String) Indicates whether the specified object can be removed in the collection.
Public method Set Sets a specific header value.
Public method SetCommaSeparatedValues Quotes any values containing comas, and then coma joins all of the values.
Public method SetValues Sets the specified header values without modification.
Public method ToString (Inherited from Object.)
Public method TryGetValue Indicates whether the HeaderDictionary tries to get the value.

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator Returns an enumerator that iterates through a collection.
Explicit interface implemetationPrivate property IDictionary<String, array<String[]>.Item Gets or sets an ICollection that contains the keys in the HeaderDictionary.

Top

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

Reference

Microsoft.Owin Namespace