Metalama 1.0 / / Metalama Documentation / Aspect API / Metalama.​Framework.​Aspects / Aspect­Order­Attribute / Aspect­Order­Attribute

Constructor AspectOrderAttribute

AspectOrderAttribute(Type[])

Initializes a new instance of the AspectOrderAttribute class that specifies the order of execution of aspects. This constructor does not allow multi-layer aspects to overlap each other. If aspects are composed of several layers, all layers of each aspect are ordered as a single group. To order layers individually, use the other constructor.

Declaration
public AspectOrderAttribute(params Type[] orderedAspectTypes)
Parameters
Type Name Description
Type[] orderedAspectTypes

A list of aspect types given the desired order of execution.

AspectOrderAttribute(String[])

Initializes a new instance of the AspectOrderAttribute class that specified the order of execution of aspect layers. This constructor allows to specify the order of execution of individual layers.

Declaration
public AspectOrderAttribute(params string[] orderedAspectLayers)
Parameters
Type Name Description
String[] orderedAspectLayers

A list of layer names composed of the full name of the aspect type and the name of the aspect layer. The following formats are allowed: MyNamespace.MyAspectType to match the default layer, MyNamespace.MyAspectType:MyLayer to match a non-default layer, or MyNamespace.MyAspectType:* to match all layers of an aspect.