Provides methods to help with the use of dynamic advices.
Namespace: PostSharp.Patterns.DynamicAdvising
Assembly: PostSharp.Patterns.Common.dll
Syntax
public static class DynamicAdvisingServicesRemarks
Some patterns, such as Aggregatable, Recordable or the threading models, add advices to advisable collections such as AdvisableCollection<T> and AdvisableDictionary<TKey, TValue> at run time. The interfaces that these advices implement are not implemented by the type of the collection, so a cast to them fails. Use QueryInterface<T>(object, bool) instead of a cast to get them.
Methods
| Name | Description |
|---|---|
| QueryInterface<T>(object, bool) | Gets the implementation of a specified interface for the specified object. |
| QueryObject(object) | Gets the principal object of an advice. |