Class InterfaceInterceptor<TInterface, TTarget>
Provides the mechanism for intercepting interface method calls.
Inheritance
System.Object
InterfaceInterceptorBase<TInterface>
InterfaceInterceptor<TInterface, TTarget>
Implements
IProxyAccess<TInterface>
Namespace: Solti.Utils.Proxy
Assembly: Solti.Utils.Proxy.dll
Syntax
public class InterfaceInterceptor<TInterface, TTarget> : InterfaceInterceptorBase<TInterface>, IProxyAccess<TInterface> where TInterface : class where TTarget : TInterface
Type Parameters
Name | Description |
---|---|
TInterface | The interface to be intercepted. |
TTarget | The target interface implementation. |
Constructors
InterfaceInterceptor(TTarget)
Creates a new InterfaceInterceptor<TInterface, TTarget> instance against the given target
.
Declaration
public InterfaceInterceptor(TTarget target)
Parameters
Type | Name | Description |
---|---|---|
TTarget | target | The target of this interceptor. |
Properties
Proxy
The most outer enclosing proxy.
Declaration
public TInterface Proxy { set; }
Property Value
Type | Description |
---|---|
TInterface |
Target
The target of this interceptor.
Declaration
public TTarget Target { get; }
Property Value
Type | Description |
---|---|
TTarget |
Methods
Invoke(InvocationContext)
Called on proxy method invocation.
Declaration
public virtual object Invoke(InvocationContext context)
Parameters
Type | Name | Description |
---|---|---|
InvocationContext | context |
Returns
Type | Description |
---|---|
System.Object | The object to return to the caller or null for void methods. |