IDynamicAdvice Interface |
Namespace: PostSharp.Patterns.DynamicAdvising
Assembly: PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 2023.0.3.0 (2023.0.3.0)
public interface IDynamicAdvice : IDynamicInterfaceImplementation
The IDynamicAdvice type exposes the following members.
Name | Description | |
---|---|---|
AdvisedObject |
Gets the principal object for which the current object is an indirect interface implementation.
(Inherited from IDynamicInterfaceImplementation.) | |
Identity |
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
| |
Order |
Gets the execution order of the dynamic advice. See DynamicAdviceOrder.
|
Name | Description | |
---|---|---|
Dispose |
Disposes the current advice. // We don't use IDisposable so that advises are not be cast to IDisposable by default.
| |
Initialize |
Initializes the current advice.
| |
QueryInterface<T> |
Gets the implementation of an interface.
|
Dynamic advices form a chain of responsibility. Specific interfaces derived from IDynamicAdvice (e.g. ICollectionDynamicAdvice<T> or IDictionaryDynamicAdvice<TKey, TValue>) define the semantics of the corresponding specific advised type (e.g. AdvisableCollection<T> or AdvisableDictionary<TKey, TValue>. The last node in the chain of implementation is the actual collection implementation.