Class InterfaceProxyGenerator
Creates a new InterfaceProxyGenerator instance which hooks into the given interface.
Inherited Members
Namespace: Solti.Utils.Proxy.Generators
Assembly: Solti.Utils.Proxy.dll
Syntax
public sealed class InterfaceProxyGenerator : Generator
Constructors
InterfaceProxyGenerator(Type)
Creates a new InterfaceProxyGenerator instance which hooks into the given interface.
Declaration
public InterfaceProxyGenerator(Type interface)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | interface | The interface to be proxied |
Properties
Interface
The target class or interface for which the proxy will be created.
Declaration
public Type Interface { get; }
Property Value
| Type | Description |
|---|---|
| System.Type |
Methods
Activate(IInterceptor, Object)
Activates the underlying duck type.
Declaration
public object Activate(IInterceptor interceptor, object target = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IInterceptor | interceptor | |
| System.Object | target |
Returns
| Type | Description |
|---|---|
| System.Object |
ActivateAsync(IInterceptor, Object, CancellationToken)
Activates the proxy type.
Declaration
public Task<object> ActivateAsync(IInterceptor interceptor, object target = null, CancellationToken cancellation = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IInterceptor | interceptor | |
| System.Object | target | |
| System.Threading.CancellationToken | cancellation |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Object> |