Table of Contents

Class ActivatorFactory

Namespace
Cuemon.Reflection
Assembly
Cuemon.Core.dll

Provides access to factory methods for creating instances of the specified generic type parameter.

public static class ActivatorFactory
Inheritance
ActivatorFactory

Methods

CreateInstance<TInstance>(Action<ActivatorOptions>)

Creates an instance of TInstance using the parameterless constructor.

public static TInstance CreateInstance<TInstance>(Action<ActivatorOptions> setup = null)

Parameters

setup Action<ActivatorOptions>

The ActivatorOptions which may be configured.

Returns

TInstance

A reference to the newly created object.

Type Parameters

TInstance

The type to create.

See Also

CreateInstance<T, TInstance>(T, Action<ActivatorOptions>)

Creates an instance of TInstance using a constructor of one parameters.

public static TInstance CreateInstance<T, TInstance>(T arg, Action<ActivatorOptions> setup = null)

Parameters

arg T

The parameter of the constructor.

setup Action<ActivatorOptions>

The ActivatorOptions which may be configured.

Returns

TInstance

A reference to the newly created object.

Type Parameters

T

The type of the parameter of the constructor.

TInstance

The type to create.

See Also

CreateInstance<T1, T2, TInstance>(T1, T2, Action<ActivatorOptions>)

Creates an instance of TInstance using a constructor of two parameters.

public static TInstance CreateInstance<T1, T2, TInstance>(T1 arg1, T2 arg2, Action<ActivatorOptions> setup = null)

Parameters

arg1 T1

The first parameter of the constructor.

arg2 T2

The second parameter of the constructor.

setup Action<ActivatorOptions>

The ActivatorOptions which may be configured.

Returns

TInstance

A reference to the newly created object.

Type Parameters

T1

The type of the first parameter of the constructor.

T2

The type of the second parameter of the constructor.

TInstance

The type to create.

See Also

CreateInstance<T1, T2, T3, TInstance>(T1, T2, T3, Action<ActivatorOptions>)

Creates an instance of TInstance using a constructor of three parameters.

public static TInstance CreateInstance<T1, T2, T3, TInstance>(T1 arg1, T2 arg2, T3 arg3, Action<ActivatorOptions> setup = null)

Parameters

arg1 T1

The first parameter of the constructor.

arg2 T2

The second parameter of the constructor.

arg3 T3

The third parameter of the constructor.

setup Action<ActivatorOptions>

The ActivatorOptions which may be configured.

Returns

TInstance

A reference to the newly created object.

Type Parameters

T1

The type of the first parameter of the constructor.

T2

The type of the second parameter of the constructor.

T3

The type of the third parameter of the constructor.

TInstance

The type to create.

See Also

CreateInstance<T1, T2, T3, T4, TInstance>(T1, T2, T3, T4, Action<ActivatorOptions>)

Creates an instance of TInstance using a constructor of four parameters.

public static TInstance CreateInstance<T1, T2, T3, T4, TInstance>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<ActivatorOptions> setup = null)

Parameters

arg1 T1

The first parameter of the constructor.

arg2 T2

The second parameter of the constructor.

arg3 T3

The third parameter of the constructor.

arg4 T4

The fourth parameter of the constructor.

setup Action<ActivatorOptions>

The ActivatorOptions which may be configured.

Returns

TInstance

A reference to the newly created object.

Type Parameters

T1

The type of the first parameter of the constructor.

T2

The type of the second parameter of the constructor.

T3

The type of the third parameter of the constructor.

T4

The type of the fourth parameter of the constructor.

TInstance

The type to create.

See Also

CreateInstance<T1, T2, T3, T4, T5, TInstance>(T1, T2, T3, T4, T5, Action<ActivatorOptions>)

Creates an instance of TInstance using a constructor of five parameters.

public static TInstance CreateInstance<T1, T2, T3, T4, T5, TInstance>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<ActivatorOptions> setup = null)

Parameters

arg1 T1

The first parameter of the constructor.

arg2 T2

The second parameter of the constructor.

arg3 T3

The third parameter of the constructor.

arg4 T4

The fourth parameter of the constructor.

arg5 T5

The fifth parameter of the constructor.

setup Action<ActivatorOptions>

The ActivatorOptions which may be configured.

Returns

TInstance

A reference to the newly created object.

Type Parameters

T1

The type of the first parameter of the constructor.

T2

The type of the second parameter of the constructor.

T3

The type of the third parameter of the constructor.

T4

The type of the fourth parameter of the constructor.

T5

The type of the fifth parameter of the constructor.

TInstance

The type to create.

See Also