IOperationExecutionContext Interface

Provides the context for an execution.

Inheritance Hierarchy

Syntax

public interface IOperationExecutionContext

Properties

Name Description
Agent

Gets the current agent.

CancellationToken

Gets the current System.Threading.CancellationToken for the operation.

ExecutionId

Gets the current execution ID.

ExecutionStatus

Gets the current execution status.

Log

Gets the execution log.

ServerName

Gets the name of the current server used for operations.

Simulation

Gets a value indicating whether state-modifying actions should be simulated.

WorkingDirectory

Gets the default working directory used for operations.

Methods

Name Description
ApplyTextTemplateAsync(string text, System.Collections.Generic.IReadOnlyDictionary<string, Inedo.ExecutionEngine.RuntimeValue> additionalVariables)

Applies full OtterScript template transformation to the specified text using the current execution context.

ExpandVariables(string text)

Expands variables in the specified string using the current execution context.

ExpandVariablesAsync(string text)

Expands variables in the specified string using the current execution context.

GetAgent(string serverName)

Returns the agent with the specified server name and associates it with the current execution.

GetAgentAsync(string serverName)

Returns the agent with the specified server name and associates it with the current execution.

GetRuntimeVariables

Returns a dictionary containing all runtime variables that are accessible from the current scope.

ResolvePath(string path)

Returns a fully-resolved absolute path of the specified file or directory.

SetVariableValue(string variableName, Inedo.ExecutionEngine.RuntimeValue variableValue)

Sets the value of the specified execution variable, or creates a new one in the current scope.

SetVariableValue(Inedo.ExecutionEngine.RuntimeVariableName variableName, Inedo.ExecutionEngine.RuntimeValue variableValue)

Sets the value of the specified execution variable, or creates a new one in the current scope.

TryGetFunctionValue(string functionName, Inedo.ExecutionEngine.RuntimeValue[] args)

Returns the value of the specified function or null (Nothing in Visual Basic) if the function is not defined.

TryGetServiceAsync<TService>

Returns a service-provider that implements the interface specified by <typeparamref name="TService" />.

TryGetVariableValue(Inedo.ExecutionEngine.RuntimeVariableName variableName)

Returns the value of the specified variable or null (Nothing in Visual Basic) if the variable is not defined.