Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

IAdvisorAdapterRegistry.Wrap Method

Returns an IAdvisor wrapping the supplied advice.

[Visual Basic]
Public Sub Wrap( _
   ByVal advice As Object _
IAdvisor Wrap(
   object advice


The object that should be an advice, such as IBeforeAdvice or IThrowsAdvice.

Return Value

An IAdvisor wrapping the supplied advice. Never returns . If the advice parameter is an IAdvisor, it will simply be returned.


Exception Type Condition
UnknownAdviceTypeException If no registered IAdvisorAdapter can wrap the supplied advice.

See Also

IAdvisorAdapterRegistry Interface | Spring.Aop.Framework.Adapter Namespace