PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Collections.​Advices Namespace / Dictionary­Dynamic­Advice(TKey, TValue) Class

DictionaryDynamicAdvice<TKey, TValue> Class

Base implementation for dynamic advices added to an AdvisableDictionary<TKey, TValue>.
Inheritance Hierarchy
    PostSharp.Patterns.Collections.Advices.DictionaryDynamicAdvice<TKey, TValue>

Namespace:  PostSharp.Patterns.Collections.Advices
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 2023.0.3.0 (2023.0.3.0)
public abstract class DictionaryDynamicAdvice<TKey, TValue> : DynamicAdvice, 
	IDictionaryDynamicAdvice<TKey, TValue>, ICollectionDynamicAdviceBase, IDynamicAdvice, IDynamicInterfaceImplementation

Type Parameters

Type of dictionary keys.
Type of dictionary values.

The DictionaryDynamicAdvice<TKey, TValue> type exposes the following members.

Protected methodDictionaryDynamicAdvice<TKey, TValue>
Initializes a new DictionaryDynamicAdvice<TKey, TValue>.
Protected propertyAdvisedObject
Gets the advised object.
(Inherited from DynamicAdvice.)
Protected propertyDictionary
Gets the advised dictionary.
Public propertyIdentity
Gets the type identity of the advice, which should correspond to the first parameter of the Advise(Type, Func<IQueryInterface, IDynamicAdvice>) method. This is typically the generic type definition of the advice
(Inherited from DynamicAdvice.)
Public propertyOrder
Gets the execution order of the dynamic advice. See DynamicAdviceOrder.
(Inherited from DynamicAdvice.)
Public methodAddItem
Adds an item to the dictionary.
Public methodClearItems
Empties the dictionary.
Public methodDispose
Disposes the current advice. // We don't use IDisposable so that advises are not be cast to IDisposable by default.
(Inherited from DynamicAdvice.)
Public methodInitialize
Initializes the current advice.
(Inherited from DynamicAdvice.)
Public methodIsReadOnly
Determines whether the advised collection is read-only.
Public methodIsSynchronized
Determines whether the advised collection is synchronized (i.e. thread-safe).
Public methodQueryInterface<TInterface> (Inherited from DynamicAdvice.)
Public methodRemoveItem
Removes an item from the dictionary.
Public methodSetItem
Replaces an item with another one in the dictionary.
Public methodToArray
Copies the dictionary to an array of keys and values.
See Also