Open sandboxFocus

Method Advise

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
bool

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