Class Type<T>.Constructor<T1, T2, T3>
Provides access to constructor of type T with three parameters.
Inherited Members
Namespace: DotNext.Reflection
Assembly: DotNext.Reflection.dll
Syntax
public static class Constructor<T1, T2, T3>
Type Parameters
| Name | Description |
|---|---|
| T1 | Type of first constructor parameter. |
| T2 | Type of second constructor parameter. |
| T3 | Type of third constructor parameter. |
Methods
| Improve this Doc View SourceGet(Boolean)
Returns constructor T with three
parameters of type T1, T2 and T3.
Declaration
public static Constructor<Func<T1, T2, T3, T>> Get(bool nonPublic = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | nonPublic | true to reflect non-public constructor. |
Returns
| Type | Description |
|---|---|
| Constructor<Func<T1, T2, T3, T>> | Reflected constructor with three parameters; or null, if it doesn't exist. |
Invoke(T1, T2, T3, Boolean)
Invokes constructor.
Declaration
public static T Invoke(T1 arg1, T2 arg2, T3 arg3, bool nonPublic = false)
Parameters
| Type | Name | Description |
|---|---|---|
| T1 | arg1 | First constructor argument. |
| T2 | arg2 | Second constructor argument. |
| T3 | arg3 | Third constructor argument. |
| Boolean | nonPublic | true to reflect non-public constructor. |
Returns
| Type | Description |
|---|---|
| T | Instance of |
Exceptions
| Type | Condition |
|---|---|
| MissingConstructorException | Constructor doesn't exist. |
Require(Boolean)
Returns constructor T with three
parameters of type T1, T2 and T3.
Declaration
public static Constructor<Func<T1, T2, T3, T>> Require(bool nonPublic = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | nonPublic | true to reflect non-public constructor. |
Returns
| Type | Description |
|---|---|
| Constructor<Func<T1, T2, T3, T>> | Reflected constructor with three parameters. |
Exceptions
| Type | Condition |
|---|---|
| MissingConstructorException | Constructor doesn't exist. |
TryInvoke(T1, T2, T3, Boolean)
Invokes constructor.
Declaration
public static Optional<T> TryInvoke(T1 arg1, T2 arg2, T3 arg3, bool nonPublic = false)
Parameters
| Type | Name | Description |
|---|---|---|
| T1 | arg1 | First constructor argument. |
| T2 | arg2 | Second constructor argument. |
| T3 | arg3 | Third constructor argument. |
| Boolean | nonPublic | true to reflect non-public constructor. |
Returns
| Type | Description |
|---|---|
| Optional<T> | Instance of |