Class DuckGenerator
Type generator for creating a proxy that wraps the Target to implement the Interface.
Inheritance
System.Object
DuckGenerator
Assembly: Solti.Utils.Proxy.dll
Syntax
public sealed class DuckGenerator : Generator
Constructors
DuckGenerator(Type, Type)
Type generator for creating a proxy that wraps the Target to implement the Interface.
Declaration
public DuckGenerator(Type iface, Type target)
Parameters
Type |
Name |
Description |
System.Type |
iface |
|
System.Type |
target |
|
Properties
Interface
The interface for which the proxy will be created.
Declaration
public Type Interface { get; }
Property Value
Type |
Description |
System.Type |
|
Target
The target implementing all the Interface members.
Declaration
public Type Target { get; }
Property Value
Type |
Description |
System.Type |
|
Methods
Activate(Object)
Activates the underlying duck type.
Declaration
public object Activate(object target)
Parameters
Type |
Name |
Description |
System.Object |
target |
|
Returns
Type |
Description |
System.Object |
|
ActivateAsync(Object, CancellationToken)
Activates the underlying duck type.
Declaration
public Task<object> ActivateAsync(object target, CancellationToken cancellation = null)
Parameters
Type |
Name |
Description |
System.Object |
target |
|
System.Threading.CancellationToken |
cancellation |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Object> |
|