MetalamaAPI documentationAspect APIMetalama.​Framework.​Code.​Declaration­BuildersAttribute­ConstructionCreate
Open sandboxFocus

AttributeConstruction.Create Method

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

Create(Type, IReadOnlyList<Object>, IReadOnlyList<KeyValuePair<String, Object>>)

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