IDynamicallyAdvisable.Advise Method |
Adds an advice to the object.
Namespace: PostSharp.Patterns.DynamicAdvising
Assembly: PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.4.11.0 (6.4.11.0)

C#
bool Advise( Type type, Func<IQueryInterface, IDynamicAdvice> createAdvice )
Parameters
- type
- Type: System.Type
The advice type identity. - createAdvice
- Type: System.Func<IQueryInterface, IDynamicAdvice>
A delegate that instantiates the advice if it has not yet been added to the object.
Return Value
Type: Booleantrue if the advice was added, false if it was already added.
