Table of Contents

Class TemplateStepAttribute

Namespace
PatternKit.Generators.Template
Assembly
PatternKit.Generators.Abstractions.dll

Marks a method as a step in the template method workflow. Steps execute in ascending order.

[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public sealed class TemplateStepAttribute : Attribute
Inheritance
TemplateStepAttribute
Inherited Members

Constructors

TemplateStepAttribute(int)

Initializes a new template step with the specified execution order.

public TemplateStepAttribute(int order)

Parameters

order int

The execution order (lower values execute first).

Properties

Name

Optional name for diagnostics and documentation.

public string? Name { get; set; }

Property Value

string

Optional

Whether this step is optional. Optional steps may be skipped in error scenarios.

public bool Optional { get; set; }

Property Value

bool

Order

Execution order of this step. Required. Steps execute in ascending order.

public int Order { get; }

Property Value

int