PostSharp6.2/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
System.Object
  PostSharp.Patterns.DynamicAdvising.DynamicAdvice
    PostSharp.Patterns.Collections.Advices.DictionaryDynamicAdvice<TKey, TValue>

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

Type Parameters

TKey
Type of dictionary keys.
TValue
Type of dictionary values.

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

Constructors
  NameDescription
Protected methodDictionaryDynamicAdvice<TKey, TValue>
Initializes a new DictionaryDynamicAdvice<TKey, TValue>.
Properties
  NameDescription
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.)
Methods
  NameDescription
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