Class OperationsBase
- Namespace
- Ando.Operations
- Assembly
- ando.dll
Base class for operation classes with shared registration logic.
public abstract class OperationsBase
- Inheritance
-
OperationsBase
- Derived
- Inherited Members
Constructors
OperationsBase(StepRegistry, IBuildLogger, Func<ICommandExecutor>)
protected OperationsBase(StepRegistry registry, IBuildLogger logger, Func<ICommandExecutor> executorFactory)
Parameters
registryStepRegistryloggerIBuildLoggerexecutorFactoryFunc<ICommandExecutor>
Fields
ExecutorFactory
protected readonly Func<ICommandExecutor> ExecutorFactory
Field Value
Logger
protected readonly IBuildLogger Logger
Field Value
Registry
protected readonly StepRegistry Registry
Field Value
Methods
RegisterCommand(string, string, Func<ArgumentBuilder>, string?, string?, Dictionary<string, string>?)
Registers a step that executes a command with arguments built by the provided builder function. The buildArgs function is called at step execution time, not registration time, allowing for deferred evaluation of values that may require API calls or prompts.
protected void RegisterCommand(string stepName, string command, Func<ArgumentBuilder> buildArgs, string? context = null, string? workingDirectory = null, Dictionary<string, string>? environment = null)
Parameters
stepNamestringcommandstringbuildArgsFunc<ArgumentBuilder>contextstringworkingDirectorystringenvironmentDictionary<string, string>
RegisterCommand(string, string, string[], string?, string?, Dictionary<string, string>?)
Registers a step that executes a command with the given arguments.
protected void RegisterCommand(string stepName, string command, string[] args, string? context = null, string? workingDirectory = null, Dictionary<string, string>? environment = null)
Parameters
stepNamestringcommandstringargsstring[]contextstringworkingDirectorystringenvironmentDictionary<string, string>
RegisterCommandWithEnsurer(string, string, Func<ArgumentBuilder>, Func<Task>?, string?, string?, Dictionary<string, string>?)
Registers a step that runs an ensurer before executing a command with builder args. The ensurer is called at execution time to auto-install required SDKs/runtimes. The buildArgs function is also called at execution time, not registration time.
protected void RegisterCommandWithEnsurer(string stepName, string command, Func<ArgumentBuilder> buildArgs, Func<Task>? ensurer, string? context = null, string? workingDirectory = null, Dictionary<string, string>? environment = null)
Parameters
stepNamestringcommandstringbuildArgsFunc<ArgumentBuilder>ensurerFunc<Task>contextstringworkingDirectorystringenvironmentDictionary<string, string>
RegisterCommandWithEnsurer(string, string, string[], Func<Task>?, string?, string?, Dictionary<string, string>?)
Registers a step that runs an ensurer before executing a command with string array args. The ensurer is called at execution time to auto-install required SDKs/runtimes.
protected void RegisterCommandWithEnsurer(string stepName, string command, string[] args, Func<Task>? ensurer, string? context = null, string? workingDirectory = null, Dictionary<string, string>? environment = null)