Table of Contents

Class BuildContext

Namespace
Ando.Scripting
Assembly
ando.dll

Container for all build state and operations used during script execution. Created by ScriptHost and used throughout the build lifecycle.

public class BuildContext
Inheritance
BuildContext
Inherited Members

Constructors

BuildContext(string, IBuildLogger)

public BuildContext(string rootPath, IBuildLogger logger)

Parameters

rootPath string
logger IBuildLogger

Properties

Ando

ANDO operations for nested builds.

public AndoOperations Ando { get; }

Property Value

AndoOperations

AppService

Azure App Service deployment operations.

public AppServiceOperations AppService { get; }

Property Value

AppServiceOperations

Artifacts

Artifact operations for copying files to host.

public ArtifactOperations Artifacts { get; }

Property Value

ArtifactOperations

Azure

Azure CLI authentication and account operations.

public AzureOperations Azure { get; }

Property Value

AzureOperations

Bicep

Azure Bicep deployment operations.

public BicepOperations Bicep { get; }

Property Value

BicepOperations

Cloudflare

Cloudflare operations (Pages deployment, etc.).

public CloudflareOperations Cloudflare { get; }

Property Value

CloudflareOperations

Context

Unified context with Paths and Vars.

public BuildContextObject Context { get; }

Property Value

BuildContextObject

Dotnet

.NET CLI operations.

public DotnetOperations Dotnet { get; }

Property Value

DotnetOperations

Ef

Entity Framework operations.

public EfOperations Ef { get; }

Property Value

EfOperations

Executor

Current command executor (local or container).

public ICommandExecutor Executor { get; }

Property Value

ICommandExecutor

Functions

Azure Functions deployment operations.

public FunctionsOperations Functions { get; }

Property Value

FunctionsOperations

Log

Logging operations for build script output.

public LogOperations Log { get; }

Property Value

LogOperations

Logger

Logger for build output.

public IBuildLogger Logger { get; }

Property Value

IBuildLogger

Node

Node.js installation operations (installs Node.js globally).

public NodeInstallOperations Node { get; }

Property Value

NodeInstallOperations

Npm

npm operations.

public NpmOperations Npm { get; }

Property Value

NpmOperations

Nuget

NuGet package operations (pack, push).

public NugetOperations Nuget { get; }

Property Value

NugetOperations

Operations

Container for all build operations.

public BuildOperations Operations { get; }

Property Value

BuildOperations

Options

Build configuration options.

public BuildOptions Options { get; }

Property Value

BuildOptions

ProfileRegistry

Registry for build profiles.

public ProfileRegistry ProfileRegistry { get; }

Property Value

ProfileRegistry

StepRegistry

Registry of steps to execute.

public StepRegistry StepRegistry { get; }

Property Value

StepRegistry

Methods

CopyArtifactsToHostAsync()

Copies registered artifacts from the container to the host. Called after successful build completion.

public Task CopyArtifactsToHostAsync()

Returns

Task

SetDockerManager(DockerManager, string, string)

Sets the Docker manager, container ID, and host root path for artifact operations. Called by CLI after container is created.

public void SetDockerManager(DockerManager dockerManager, string containerId, string hostRootPath)

Parameters

dockerManager DockerManager

The Docker manager instance.

containerId string

The container ID for docker exec/cp commands.

hostRootPath string

The host path where the project is located.

SetExecutor(ICommandExecutor)

Sets the command executor (e.g., when switching to container execution). Called by CLI after script loading when Docker mode is enabled.

public void SetExecutor(ICommandExecutor executor)

Parameters

executor ICommandExecutor