Class Generator<TUntypedGenerator, TDescendant>

Base of typed generators.

Inheritance
System.Object
Generator<TUntypedGenerator, TDescendant>
ClassProxyGenerator<TClass>
DelegateProxyGenerator<TDelegate>
DuckGenerator<TInterface, TTarget>
InterfaceProxyGenerator<TInterface>
Namespace: Solti.Utils.Proxy.Internals
Assembly: Solti.Utils.Proxy.dll
Syntax
public abstract class Generator<TUntypedGenerator, TDescendant> : Object where TUntypedGenerator : Generator where TDescendant : Generator<TUntypedGenerator, TDescendant>, new()
Type Parameters
Name Description
TUntypedGenerator
TDescendant
Remarks

Generators should not be instantiated. To access the created System.Type use the GetGeneratedType() or GetGeneratedTypeAsync(CancellationToken) method.

Constructors

Generator()

Declaration
protected Generator()

Properties

Instance

The singleton generator instance.

Declaration
public static TUntypedGenerator Instance { get; }
Property Value
Type Description
TUntypedGenerator

Methods

GetConcreteGenerator()

Gets the concrete generator.

Declaration
protected abstract TUntypedGenerator GetConcreteGenerator()
Returns
Type Description
TUntypedGenerator

GetGeneratedType()

Gets the generated System.Type.

Declaration
public static Type GetGeneratedType()
Returns
Type Description
System.Type
Remarks

The returned System.Type is generated only once.

GetGeneratedTypeAsync(CancellationToken)

Gets the generated System.Type asynchronously.

Declaration
public static Task<Type> GetGeneratedTypeAsync(CancellationToken cancellation = null)
Parameters
Type Name Description
System.Threading.CancellationToken cancellation
Returns
Type Description
System.Threading.Tasks.Task<System.Type>
Remarks

The returned System.Type is generated only once.

In This Article
Back to top Generated by DocFX