Class AspectOptions
Options when Applying an Aspect.
Implements
Inherited Members
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class AspectOptions : IAspectOptions
Syntax (vb)
Public Class AspectOptions Implements IAspectOptions
Remarks
ExampleMetadata: infused
Examples
class MutatingAspect : IAspect
{
public void Visit(IConstruct node)
{
}
}
class ValidationAspect : IAspect
{
public void Visit(IConstruct node)
{
}
}
var stack = new Stack();
Aspects.Of(stack).Add(new MutatingAspect(), new AspectOptions { Priority = AspectPriority.MUTATING }); // Run first (mutating aspects)
Aspects.Of(stack).Add(new ValidationAspect(), new AspectOptions { Priority = AspectPriority.READONLY });
Synopsis
Constructors
| AspectOptions() | Options when Applying an Aspect. |
Properties
| Priority | The priority value to apply on an Aspect. Priority must be a non-negative integer. |
Constructors
AspectOptions()
Options when Applying an Aspect.
public AspectOptions()
Remarks
ExampleMetadata: infused
Examples
class MutatingAspect : IAspect
{
public void Visit(IConstruct node)
{
}
}
class ValidationAspect : IAspect
{
public void Visit(IConstruct node)
{
}
}
var stack = new Stack();
Aspects.Of(stack).Add(new MutatingAspect(), new AspectOptions { Priority = AspectPriority.MUTATING }); // Run first (mutating aspects)
Aspects.Of(stack).Add(new ValidationAspect(), new AspectOptions { Priority = AspectPriority.READONLY });
Properties
Priority
The priority value to apply on an Aspect. Priority must be a non-negative integer.
public double? Priority { get; set; }
Property Value
Remarks
Aspects that have same priority value are not guaranteed to be executed in a consistent order.
Default: AspectPriority.DEFAULT