Table of Contents

Class BuildModel

Namespace
Invex.Atom.Build.Model
Assembly
Invex.Atom.Build.dll

Represents the complete model of a build, including all targets and their states.

public sealed record BuildModel
Inheritance
object
BuildModel

Remarks

This model is generated by Atom on startup and serves as the primary source of information for the build. It is immutable by design, except the values in TargetStates.

Constructors

BuildModel()

public BuildModel()

Properties

CurrentTarget

Gets the target that is currently running.

public TargetModel? CurrentTarget { get; }

Property Value

TargetModel

The currently running TargetModel, or null if no target is running.

DeclaringAssembly

Gets the assembly in which the build was defined.

public required Assembly DeclaringAssembly { get; init; }

Property Value

Assembly

TargetStates

Gets a read-only dictionary mapping each target to its current state.

public required IReadOnlyDictionary<TargetModel, TargetState> TargetStates { get; init; }

Property Value

IReadOnlyDictionary<TargetModel, TargetState>
See Also

Targets

Gets a read-only list of all targets defined in the build, regardless of their execution status.

public required IReadOnlyList<TargetModel> Targets { get; init; }

Property Value

IReadOnlyList<TargetModel>

Methods

GetTarget(string)

Gets a target by its name.

public TargetModel GetTarget(string name)

Parameters

name string

The name of the target to retrieve.

Returns

TargetModel

The TargetModel with the specified name.

Exceptions

ArgumentException

Thrown if no target with the specified name is found.

GetTargetState(TargetModel)

Gets the state of a target.

public TargetState GetTargetState(TargetModel target)

Parameters

target TargetModel

The target whose state to retrieve.

Returns

TargetState

The TargetState for the specified target.

Exceptions

InvalidOperationException

Thrown if the target is not present in the build model target states.