Intercept.ThroughProxyWithAdditionalInterfaces Method

Returns a IInterceptingProxy for type interceptedType which wraps the supplied target.

Namespace:  Microsoft.Practices.Unity.InterceptionExtension
Assembly:  Microsoft.Practices.Unity.Interception (in Microsoft.Practices.Unity.Interception.dll)

Syntax

'Declaration
Public Shared Function ThroughProxyWithAdditionalInterfaces ( _
    interceptedType As Type, _
    target As Object, _
    interceptor As IInstanceInterceptor, _
    interceptionBehaviors As IEnumerable(Of IInterceptionBehavior), _
    additionalInterfaces As IEnumerable(Of Type) _
) As Object
public static Object ThroughProxyWithAdditionalInterfaces(
    Type interceptedType,
    Object target,
    IInstanceInterceptor interceptor,
    IEnumerable<IInterceptionBehavior> interceptionBehaviors,
    IEnumerable<Type> additionalInterfaces
)
public:
static Object^ ThroughProxyWithAdditionalInterfaces(
    Type^ interceptedType, 
    Object^ target, 
    IInstanceInterceptor^ interceptor, 
    IEnumerable<IInterceptionBehavior^>^ interceptionBehaviors, 
    IEnumerable<Type^>^ additionalInterfaces
)
public static function ThroughProxyWithAdditionalInterfaces(
    interceptedType : Type, 
    target : Object, 
    interceptor : IInstanceInterceptor, 
    interceptionBehaviors : IEnumerable<IInterceptionBehavior>, 
    additionalInterfaces : IEnumerable<Type>
) : Object

Parameters

  • interceptedType
    Type: System.Type
    The type to intercept.

Return Value

A proxy for target compatible with interceptedType.

Exceptions

Exception Condition
System.ArgumentNullException when interceptedType is nulla null reference (Nothing in Visual Basic).
System.ArgumentNullException when target is nulla null reference (Nothing in Visual Basic).
System.ArgumentNullException when interceptor is nulla null reference (Nothing in Visual Basic).
System.ArgumentNullException when interceptionBehaviors is nulla null reference (Nothing in Visual Basic).
System.ArgumentNullException when additionalInterfaces is nulla null reference (Nothing in Visual Basic).
System.ArgumentException when interceptor cannot intercept interceptedType.

See Also

Intercept Class

Microsoft.Practices.Unity.InterceptionExtension Namespace