Show / Hide Table of Contents

Class EventedDictionary<TKey, TValue, TContext>

Represents a dictionary that rises events

Inheritance
System.Object
EventedCollectionBase<TContext>
EventedDictionary<TKey, TValue, TContext>
Implements
System.Collections.Generic.IDictionary<TKey, TValue>
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>
System.Collections.IEnumerable
Inherited Members
EventedCollectionBase<TContext>.ContextReadOnly
EventedCollectionBase<TContext>.Context
EventedCollectionBase<TContext>.GetReadOnlyEvent
EventedCollectionBase<TContext>.IsReadOnly
EventedCollectionBase<TContext>.CheckReadOnly()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NFX.Collections
Assembly: NFX.dll
Syntax
[Serializable]
public class EventedDictionary<TKey, TValue, TContext> : EventedCollectionBase<TContext>, IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable
Type Parameters
Name Description
TKey
TValue
TContext

Constructors

EventedDictionary()

Initializes a new instance that is empty, has the default initial capacity, and uses the default equality comparer for the key type.

Declaration
public EventedDictionary()

EventedDictionary(TContext, Boolean)

Initializes a new instance that is empty, has the default initial capacity, and uses the default equality comparer for the key type.

Declaration
public EventedDictionary(TContext context, bool contextReadOnly)
Parameters
Type Name Description
TContext context
System.Boolean contextReadOnly

EventedDictionary(TContext, Boolean, IDictionary<TKey, TValue>)

Initializes a new instance that contains elements copied from the specified IDictionary[TKey,TValue] and uses the default equality comparer for the key type.

Declaration
public EventedDictionary(TContext context, bool contextReadOnly, IDictionary<TKey, TValue> dictionary)
Parameters
Type Name Description
TContext context
System.Boolean contextReadOnly
System.Collections.Generic.IDictionary<TKey, TValue> dictionary

EventedDictionary(TContext, Boolean, IDictionary<TKey, TValue>, IEqualityComparer<TKey>)

Initializes a new instance that contains elements copied from the specified IDictionary[TKey,TValue] and uses the specified IEqualityComparer[T].

Declaration
public EventedDictionary(TContext context, bool contextReadOnly, IDictionary<TKey, TValue> dictionary, IEqualityComparer<TKey> comparer)
Parameters
Type Name Description
TContext context
System.Boolean contextReadOnly
System.Collections.Generic.IDictionary<TKey, TValue> dictionary
System.Collections.Generic.IEqualityComparer<TKey> comparer

EventedDictionary(TContext, Boolean, IEqualityComparer<TKey>)

Initializes a new instance that is empty, has the default initial capacity, and uses the specified IEqualityComparer[T].

Declaration
public EventedDictionary(TContext context, bool contextReadOnly, IEqualityComparer<TKey> comparer)
Parameters
Type Name Description
TContext context
System.Boolean contextReadOnly
System.Collections.Generic.IEqualityComparer<TKey> comparer

EventedDictionary(TContext, Boolean, Int32)

Initializes a new instance that is empty, has the specified initial capacity, and uses the default equality comparer for the key type.

Declaration
public EventedDictionary(TContext context, bool contextReadOnly, int capacity)
Parameters
Type Name Description
TContext context
System.Boolean contextReadOnly
System.Int32 capacity

EventedDictionary(TContext, Boolean, Int32, IEqualityComparer<TKey>)

Initializes a new instance of the Dictionary[TKey,TValue] class that is empty, has the specified initial capacity, and uses the specified IEqualityComparer[T]

Declaration
public EventedDictionary(TContext context, bool contextReadOnly, int capacity, IEqualityComparer<TKey> comparer)
Parameters
Type Name Description
TContext context
System.Boolean contextReadOnly
System.Int32 capacity
System.Collections.Generic.IEqualityComparer<TKey> comparer

Fields

ChangeEvent

Declaration
[NonSerialized]
public EventedDictionary<TKey, TValue, TContext>.ChangeHandler ChangeEvent
Field Value
Type Description
EventedDictionary.ChangeHandler<>

Properties

Count

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32

Item[TKey]

Declaration
public TValue this[TKey key] { get; set; }
Parameters
Type Name Description
TKey key
Property Value
Type Description
TValue

Keys

Declaration
public ICollection<TKey> Keys { get; }
Property Value
Type Description
System.Collections.Generic.ICollection<TKey>

Values

Declaration
public ICollection<TValue> Values { get; }
Property Value
Type Description
System.Collections.Generic.ICollection<TValue>

Methods

Add(TKey, TValue)

Declaration
public void Add(TKey key, TValue value)
Parameters
Type Name Description
TKey key
TValue value

Add(KeyValuePair<TKey, TValue>)

Declaration
public void Add(KeyValuePair<TKey, TValue> item)
Parameters
Type Name Description
System.Collections.Generic.KeyValuePair<TKey, TValue> item

Clear()

Declaration
public void Clear()

Contains(KeyValuePair<TKey, TValue>)

Declaration
public bool Contains(KeyValuePair<TKey, TValue> item)
Parameters
Type Name Description
System.Collections.Generic.KeyValuePair<TKey, TValue> item
Returns
Type Description
System.Boolean

ContainsKey(TKey)

Declaration
public bool ContainsKey(TKey key)
Parameters
Type Name Description
TKey key
Returns
Type Description
System.Boolean

CopyTo(KeyValuePair<TKey, TValue>[], Int32)

Declaration
public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
Parameters
Type Name Description
System.Collections.Generic.KeyValuePair<TKey, TValue>[] array
System.Int32 arrayIndex

GetEnumerator()

Declaration
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>>

Remove(TKey)

Declaration
public bool Remove(TKey key)
Parameters
Type Name Description
TKey key
Returns
Type Description
System.Boolean

Remove(KeyValuePair<TKey, TValue>)

Declaration
public bool Remove(KeyValuePair<TKey, TValue> item)
Parameters
Type Name Description
System.Collections.Generic.KeyValuePair<TKey, TValue> item
Returns
Type Description
System.Boolean

TryGetValue(TKey, out TValue)

Declaration
public bool TryGetValue(TKey key, out TValue value)
Parameters
Type Name Description
TKey key
TValue value
Returns
Type Description
System.Boolean

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

Implements

System.Collections.Generic.IDictionary<TKey, TValue>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable

Extension Methods

CollectionUtils.ForEach<T>(IEnumerable<T>, Action<T>)
CollectionUtils.ForEach<T>(IEnumerable<T>, Action<T, Int32>)
CollectionUtils.AddRange<TKey, TValue>(IDictionary<TKey, TValue>, IEnumerable<KeyValuePair<TKey, TValue>>)
CollectionUtils.SkipLast<T>(IEnumerable<T>)
CollectionUtils.SkipLast<T>(IEnumerable<T>, Int32)
CollectionUtils.FirstMin<TResult, TComparand>(IEnumerable<TResult>, Func<TResult, TComparand>)
CollectionUtils.FirstMin<TResult, TComparand>(IEnumerable<TResult>, Func<TResult, TComparand>, out TComparand)
CollectionUtils.FirstMax<TResult, TComparand>(IEnumerable<TResult>, Func<TResult, TComparand>)
CollectionUtils.FirstMax<TResult, TComparand>(IEnumerable<TResult>, Func<TResult, TComparand>, out TComparand)
CollectionUtils.FirstOrAnyOrDefault<TResult>(IEnumerable<TResult>, Func<TResult, Boolean>)
CollectionUtils.Distinct<TResult, TKey>(IEnumerable<TResult>, Func<TResult, TKey>)
MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
LookAheadExtensions.AsLookAheadEnumerable<T>(IEnumerable<T>)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX