PostSharpAPI ReferencePost­Sharp.​Patterns.​CollectionsAdvisable­Dictionary<TKey, TValue>Advisable­Dictionary
Open sandboxFocus

AdvisableDictionary<TKey, TValue> Constructor

AdvisableDictionary()

Initializes a new instance of the AdvisableDictionary<TKey, TValue> class that is empty, has the default initial capacity, and uses the default equality comparer for the key type.

Declaration
public AdvisableDictionary()

AdvisableDictionary(IDictionary<TKey, TValue>)

Initializes a new instance of the AdvisableDictionary<TKey, TValue> class that contains elements copied from the specified IDictionary<TKey,TValue> and uses the default equality comparer for the key type.

Declaration
public AdvisableDictionary(IDictionary<TKey, TValue> dictionary)
Parameters
Type Name Description
IDictionary<TKey, TValue> dictionary

The IDictionary<TKey,TValue> whose elements are copied to the new AdvisableDictionary<TKey, TValue>.

AdvisableDictionary(IEqualityComparer<TKey>)

Initializes a new instance of the AdvisableDictionary<TKey, TValue> that is empty, has the default initial capacity, and uses the specified equality comparer for the key type.

Declaration
public AdvisableDictionary(IEqualityComparer<TKey> comparer)
Parameters
Type Name Description
System.Collections.Generic.IEqualityComparer<TKey> comparer

The System.Collections.Generic.IEqualityComparer<> implementation to use when comparing keys, or null to use the default EqualityComparer<T> for the type of the key.

AdvisableDictionary(Int32)

Initializes a new instance of the AdvisableDictionary<TKey, TValue> class that is empty, has the specified initial capacity, and uses the default equality comparer for the key type.

Declaration
public AdvisableDictionary(int capacity)
Parameters
Type Name Description
Int32 capacity

The initial number of elements that the AdvisableDictionary<TKey, TValue> can contain.

AdvisableDictionary(IDictionary<TKey, TValue>, IEqualityComparer<TKey>)

Initializes a new instance of the AdvisableDictionary<TKey, TValue> class that contains elements copied from the specified IDictionary<TKey,TValue> and uses the specified System.Collections.Generic.IEqualityComparer<>.

Declaration
public AdvisableDictionary(IDictionary<TKey, TValue> dictionary, IEqualityComparer<TKey> comparer)
Parameters
Type Name Description
IDictionary<TKey, TValue> dictionary

The IDictionary<TKey,TValue> whose elements are copied to the new AdvisableDictionary<TKey, TValue>.

System.Collections.Generic.IEqualityComparer<TKey> comparer

The System.Collections.Generic.IEqualityComparer<> implementation to use when comparing keys, or null to use the default EqualityComparer<T> for the type of the key.

AdvisableDictionary(Int32, IEqualityComparer<TKey>)

Initializes a new instance of the AdvisableDictionary<TKey, TValue> that is empty, has a specified initial capacity, and uses the specified equality comparer for the key type.

Declaration
public AdvisableDictionary(int capacity, IEqualityComparer<TKey> comparer)
Parameters
Type Name Description
Int32 capacity

The initial number of elements that the AdvisableDictionary<TKey, TValue> can contain.

System.Collections.Generic.IEqualityComparer<TKey> comparer

The System.Collections.Generic.IEqualityComparer<> implementation to use when comparing keys, or null to use the default EqualityComparer<T> for the type of the key.

AdvisableDictionary(SerializationInfo, StreamingContext)

Deserialization constructor.

Declaration
protected AdvisableDictionary(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info
StreamingContext context