Action

Abstract base class for all actions. Provides async execution with cancellation support.

Definition

Namespace: Paragon.Core.ActionSystem Assembly: Paragon.dll

[Serializable]
public abstract class Action : IAction

Inheritance: ObjectAction Implements: IAction

Properties

IsRunning

Gets whether the action is currently executing.

public bool IsRunning { get; }

Methods

Execute()

Fire-and-forget execution. Calls ExecuteAsync() internally.


ExecuteAsync()

Executes the action asynchronously with full lifecycle callbacks.

Returns: Task — A task representing the action execution


Cancel()

Cancels the running action.

circle-exclamation

Complete()

Completes the running action.


SetVariable<TValue>()

Sets a variable value by name.


GetVariable<TValue>()

Gets a variable value by name.


HasVariable()

Checks if a variable exists.

Protected Methods

Override these in your action subclasses.

OnBegin()

Called before execution starts.


OnExecute()

Abstract. Implement your action logic here.


OnComplete()

Called when the action completes normally.


OnCancel()

Called when the action is canceled.


OnEnd()

Called after completion OR cancellation.

Execution Lifecycle

Example

See Also

Last updated

Was this helpful?