IBuildAction

Description

interface Tinman.Core.Build.IBuildAction

Extended by

BuildAction abstract

Base interface for classes that implement build actions that generate small pieces of Code-X compliant source code, based on a single input file.

Code-X build actions are self-contained and do not require any external configuration. All required information is obtained from the name and the content of the input file (which may reference additional content). They are by design very simple code generators and are not intended to be used for complex tasks.

Public / Methods

Collect


public method Collect → (2)

file in : Path

[not-null]
The primary input file path.

input in : ICollector<Path>

[not-null]
The collector for secondary input files.

Collects all secondary input files of this build action.

The primary input file of a build action is the one that is passed to Perform. The secondary input files of a build action are those files that are referenced by the primary input file.

IOException

If an I/O error has occurred.

Is​Input


[Constant]
public method IsInput → (1)

file in : Path

[not-null]
The file path.

returns → bool

true if file in may be passed to Perform,
false if not.

Checks whether the given file in is a valid input for this build action.

IOException

If an I/O error has occurred.

Perform


public method Perform → (2)

file in : Path

[not-null]
The file path.

check in : bool

true to check input only, without generating any code,
false to run normal code generation.

Performs this build action.

IOException

If an I/O error has occurred.

ValidatingException

If the input is invalid.

Public / Attributes

Name


[Constant]
public attribute Name → (get)

value : string

[not-empty]
The build action name.

The machine-friendly and human-readable name of this build action.

Order


[Constant]
public attribute Order → (get)

value : int32

[-10..10]
The order number.

The order number of this build action.

Build actions that depend on the output of other build actions should have positive order numbers, whereas those that just generate source code without any dependencies besides the input file should have negative order numbers.

See also

BuildActionArgs