Create(IConstructor, IReadOnlyList<TypedConstant>?, IReadOnlyList<KeyValuePair<string, TypedConstant>>?)
Creates a new AttributeConstruction by explicitly specifying the constructor and strongly-typed arguments.
Declaration
public static AttributeConstruction Create(IConstructor constructor, IReadOnlyList<TypedConstant>? constructorArguments = null, IReadOnlyList<KeyValuePair<string, TypedConstant>>? namedArguments = null)Parameters
| Type | Name | Description |
|---|---|---|
| IConstructor | constructor | The attribute constructor. |
| IReadOnlyList<TypedConstant> | constructorArguments | The constructor arguments. |
| IReadOnlyList<KeyValuePair<string, TypedConstant>> | namedArguments | The named arguments (i.e., the assigned fields and properties). |
Returns
| Type | Description |
|---|---|
| AttributeConstruction | A new AttributeConstruction instance. |
Create(Type, IReadOnlyList<object?>?, IReadOnlyList<KeyValuePair<string, object?>>?)
Creates a new AttributeConstruction by specifying the reflection Type of the attribute. The method will attempt to find a suitable constructor.
Declaration
public static AttributeConstruction Create(Type attributeType, IReadOnlyList<object?>? constructorArguments = null, IReadOnlyList<KeyValuePair<string, object?>>? namedArguments = null)Parameters
| Type | Name | Description |
|---|---|---|
| Type | attributeType | The attribute type. |
| IReadOnlyList<object> | constructorArguments | The constructor arguments. |
| IReadOnlyList<KeyValuePair<string, object>> | namedArguments | The named arguments (i.e., the assigned fields and properties). |
Returns
| Type | Description |
|---|---|
| AttributeConstruction | A new AttributeConstruction instance. |
Create(INamedType, IReadOnlyList<object?>?, IReadOnlyList<KeyValuePair<string, object?>>?)
Creates a new AttributeConstruction by specifying the INamedType of the attribute. The method will attempt to find a suitable constructor.
Declaration
public static AttributeConstruction Create(INamedType attributeType, IReadOnlyList<object?>? constructorArguments = null, IReadOnlyList<KeyValuePair<string, object?>>? namedArguments = null)Parameters
| Type | Name | Description |
|---|---|---|
| INamedType | attributeType | The attribute type. |
| IReadOnlyList<object> | constructorArguments | The constructor arguments. |
| IReadOnlyList<KeyValuePair<string, object>> | namedArguments | The named arguments (i.e., the assigned fields and properties). |
Returns
| Type | Description |
|---|---|
| AttributeConstruction | A new AttributeConstruction instance. |