Metalama//API Documentation/Aspect API/Metalama.​Framework.​Code.​Declaration­Builders/Attribute­Construction/Create
Open sandboxFocus

Method Create

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
IReadOnlyList<TypedConstant> constructorArguments
IReadOnlyList<KeyValuePair<String, TypedConstant>> namedArguments
Returns
Type Description
AttributeConstruction

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
IReadOnlyList<Object> constructorArguments
IReadOnlyList<KeyValuePair<String, Object>> namedArguments
Returns
Type Description
AttributeConstruction

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
IReadOnlyList<Object> constructorArguments
IReadOnlyList<KeyValuePair<String, Object>> namedArguments
Returns
Type Description
AttributeConstruction