IAdvised.ReplaceAdvisor Method
Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

IAdvised.ReplaceAdvisor Method

Replaces the oldAdvisor with the newAdvisor.

[Visual Basic]
Public Sub ReplaceAdvisor( _
   ByVal oldAdvisor As IAdvisor, _
   ByVal newAdvisor As IAdvisor _
bool ReplaceAdvisor(
   IAdvisor oldAdvisor,
   IAdvisor newAdvisor


The original (old) advisor to be replaced.
The new advisor to replace the oldAdvisor with.

Return Value

true if the oldAdvisor was replaced; if the oldAdvisor was not found in the advisors collection, this method returns false and (effectively) does nothing.


Exception Type Condition
AopConfigException If this proxy configuration is frozen and the oldAdvisor cannot be replaced.

See Also

IAdvised Interface | Spring.Aop.Framework Namespace | IsFrozen