AttributeConstruction.Create Method
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 |
|
System.Collections.Generic.IReadOnlyList<TypedConstant> |
constructorArguments |
|
System.Collections.Generic.IReadOnlyList<System.Collections.Generic.KeyValuePair<System.String, TypedConstant>> |
namedArguments |
|
Returns
Creates a new AttributeConstruction by specifying the reflection System.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 |
System.Type |
attributeType |
|
System.Collections.Generic.IReadOnlyList<System.Object> |
constructorArguments |
|
System.Collections.Generic.IReadOnlyList<System.Collections.Generic.KeyValuePair<System.String, System.Object>> |
namedArguments |
|
Returns
Declaration
public static AttributeConstruction Create(INamedType attributeType, IReadOnlyList<object> constructorArguments = null, IReadOnlyList<KeyValuePair<string, object>> namedArguments = null)
Parameters
Type |
Name |
Description |
INamedType |
attributeType |
|
System.Collections.Generic.IReadOnlyList<System.Object> |
constructorArguments |
|
System.Collections.Generic.IReadOnlyList<System.Collections.Generic.KeyValuePair<System.String, System.Object>> |
namedArguments |
|
Returns