BuildMaster SDK Reference
Version:

ActionBase Class

Represents the base class for all Actions.

Syntax

public class ActionBase : Inedo.Diagnostics.ILogger

Constructors

Name Description
ActionBase

Initializes a new instance of the ActionBase class.

Events

Name Description
AfterExecute

Raised after the Execute method has returned.

BeforeExecute

Raised before the Execute method is invoked.

LogReceived

Raised when a log message has been received.

MessageLogged

Occurs when a message is logged.

Properties

Name Description
Context

Gets the action context.

Timeout

Gets the number of seconds the action should execute before failing.

Methods

Name Description
CreateActionLogMessageDelegator

Creates the action log message delegator used to allow external resources to write to the action log.

Execute

Executes the action.

GetActionDescription

Returns a description of the current configuration of the action.

GetExtensionConfigurer

Gets the Inedo.BuildMaster.Extensibility.Configurers.Extension.ExtensionConfigurerBase associated with the action.

HasConfigurerSettings

Returns a value indicating whether the action uses one or more settings in its extension configurer.

IsConfigurerSettingRequired

Returns a value indicating whether the extension's configurer currently needs to be configured.

Log(Inedo.Diagnostics.MessageLevel logLevel, string message)

Writes the specified message to the Action's log.

LogDebug(string message)

Logs the specified message to the Action's log with a Debug log level.

LogDebug(string messageFmt, object[] args)

Logs the specified message to the Action's log with a Debug log level.

LogError(string message)

Logs the specified message to the Action's log with an Error log level.

LogError(string messageFmt, object[] args)

Logs the specified message to the Action's log with an Error log level.

LogInformation(string message)

Logs the specified message to the Action's log with an Information log level.

LogInformation(string messageFmt, object[] args)

Logs the specified message to the Action's log with an Information log level.

LogWarning(string message)

Logs the specified message to the Action's log with a Warning log level.

LogWarning(string messageFmt, object[] args)

Logs the specified message to the Action's log with a Warning log level.

OnAfterExecute(System.EventArgs e)

Raises the AfterExecute event.

OnBeforeExecute(System.EventArgs e)

Raises the BeforeExecute event.

OnLogReceived(LogReceivedEventArgs e)

Raises the LogReceived event.

ThrowIfCanceledOrTimeoutExpired

Throws a ActionTimeoutException if the action has been executing for at least Timeout seconds or throws a ActionCanceledException if the action has been canceled.

ToString

Returns a System.String that represents the action.

Remarks

It is normally not necessary to inherit ActionBase directly. A direct subclass will only be able to execute on the BuildMaster server and not on an Agent without explicit remoting calls. In most cases, you should inherit RemoteActionBase or AgentBasedActionBase instead.