PostSharp.ILAPI ReferencePost­Sharp.​Patterns.​Dynamic­AdvisingIDynamically­AdvisableAdvise
Open sandboxFocus

IDynamicallyAdvisable.Advise Method

Advise(Type, Func<IQueryInterface, IDynamicAdvice>)

Adds an advice to the object.

Declaration
bool Advise(Type type, Func<IQueryInterface, IDynamicAdvice> createAdvice)
Parameters
Type Name Description
Type type

The advice type identity.

Func<IQueryInterface, IDynamicAdvice> createAdvice

A delegate that instantiates the advice if it has not yet been added to the object.

Returns
Type Description
System.Boolean

true if the advice was added, false if it was already added.