Open sandboxFocus

Class DictionaryDynamicAdvice<TKey, TValue>

Base implementation for dynamic advices added to an AdvisableDictionary<TKey, TValue>.

Inheritance
DictionaryDynamicAdvice<TKey, TValue>
Namespace: PostSharp.Patterns.Collections.Advices
Assembly: PostSharp.Patterns.Common.dll
Syntax
public abstract class DictionaryDynamicAdvice<TKey, TValue> : DynamicAdvice, IDictionaryDynamicAdvice<TKey, TValue>, ICollectionDynamicAdviceBase, IDynamicAdvice, IDynamicInterfaceImplementation
Type Parameters
Name Description
TKey

Type of dictionary keys.

TValue

Type of dictionary values.

Constructors

Name Description
DictionaryDynamicAdvice(IQueryInterface)

Initializes a new DictionaryDynamicAdvice<TKey, TValue>.

Properties

Name Description
Dictionary

Gets the advised dictionary.

Methods

Name Description
AddItem(TKey, TValue, AdviceEnumerator<IDictionaryDynamicAdvice<TKey, TValue>>)

Adds an item to the dictionary.

ClearItems(AdviceEnumerator<IDictionaryDynamicAdvice<TKey, TValue>>)

Empties the dictionary.

IsReadOnly(AdviceEnumerator<ICollectionDynamicAdviceBase>)

Determines whether the advised collection is read-only.

IsSynchronized(AdviceEnumerator<ICollectionDynamicAdviceBase>)

Determines whether the advised collection is synchronized (i.e. thread-safe).

RemoveItem(TKey, TValue, AdviceEnumerator<IDictionaryDynamicAdvice<TKey, TValue>>)

Removes an item from the dictionary.

SetItem(TKey, TValue, TValue, AdviceEnumerator<IDictionaryDynamicAdvice<TKey, TValue>>)

Replaces an item with another one in the dictionary.

ToArray(AdviceEnumerator<IDictionaryDynamicAdvice<TKey, TValue>>)

Copies the dictionary to an array of keys and values.