Otter SDK Reference
Version:

IOperationExecutionContext Interface

Provides the context for an execution.

Inheritance Hierarchy

  • Inedo.Otter.Extensibility.Operations.IOperationExecutionContext

Syntax

public interface IOperationExecutionContext : IOtterContext

Properties

Name Description
Agent

Gets the current agent.

CancellationToken

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

ExecutionStatus

Gets the current execution status.

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
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.

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.

TryGetVariableValue(string variableName)

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

TryGetVariableValue(Inedo.ExecutionEngine.RuntimeVariableName variableName)

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