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.
- target
Type: System.Object
The instance to intercept.
- interceptor
Type: Microsoft.Practices.Unity.InterceptionExtension.IInstanceInterceptor
The IInstanceInterceptor to use when creating the proxy.
- interceptionBehaviors
Type: System.Collections.Generic.IEnumerable<IInterceptionBehavior>
The interception behaviors for the new proxy.
- additionalInterfaces
Type: System.Collections.Generic.IEnumerable<Type>
Any additional interfaces the proxy must implement.
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. |