Class InterfaceProxyGenerator<TInterface>
Type generator for creating proxies that intercept interface method calls.
Inheritance
System.Object
InterfaceProxyGenerator<TInterface>
Inherited Members
Namespace: Solti.Utils.Proxy.Generators
Assembly: Solti.Utils.Proxy.dll
Syntax
public sealed class InterfaceProxyGenerator<TInterface> : Generator<InterfaceProxyGenerator, InterfaceProxyGenerator<TInterface>> where TInterface : class
Type Parameters
| Name | Description |
|---|---|
| TInterface | The interface for which the proxy will be created. |
Constructors
InterfaceProxyGenerator()
Declaration
public InterfaceProxyGenerator()
Methods
Activate(IInterceptor, TInterface)
Creates an instance of the generated type.
Declaration
public static TInterface Activate(IInterceptor interceptor, TInterface target = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IInterceptor | interceptor | |
| TInterface | target |
Returns
| Type | Description |
|---|---|
| TInterface |
ActivateAsync(IInterceptor, TInterface, CancellationToken)
Creates an instance of the generated type.
Declaration
public static Task<TInterface> ActivateAsync(IInterceptor interceptor, TInterface target = null, CancellationToken cancellation = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IInterceptor | interceptor | |
| TInterface | target | |
| System.Threading.CancellationToken | cancellation |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<TInterface> |
GetConcreteGenerator()
Gets the concrete generator.
Declaration
protected override InterfaceProxyGenerator GetConcreteGenerator()
Returns
| Type | Description |
|---|---|
| InterfaceProxyGenerator |
Overrides
Solti.Utils.Proxy.Internals.Generator<Solti.Utils.Proxy.Generators.InterfaceProxyGenerator, Solti.Utils.Proxy.Generators.InterfaceProxyGenerator<TInterface>>.GetConcreteGenerator()