C# Class Nexus.Client.ModManagement.Scripting.ScriptExecutorBase

A base class for script executors.
This class implements some base functionality, making writing executors simpler.
Inheritance: IScriptExecutor
Datei anzeigen Open project: NexusMods/NexusModManager-4.5

Public Methods

Method Description
DoExecute ( IScript p_scpScript ) : bool

Performs the actual script execution.

This method is to be overridden by implementors to provide the actual execution logic.

Execute ( IScript p_scpScript ) : bool

Executes the script.

Wait ( ) : void

Blocks until the task set is completed.

Protected Methods

Method Description
OnTaskSetCompleted ( TaskSetCompletedEventArgs e ) : void

Raises the TaskSetCompleted event.

OnTaskSetCompleted ( bool p_booSuccess, string p_strMessage, IScript p_scpExecutedScript ) : void

Raises the TaskSetCompleted event.

OnTaskStarted ( EventArgs e ) : void

Raises the TaskStarted event.

OnTaskStarted ( IBackgroundTask p_bgtTask ) : void

Raises the TaskStarted event.

Method Details

DoExecute() public abstract method

Performs the actual script execution.
This method is to be overridden by implementors to provide the actual execution logic.
public abstract DoExecute ( IScript p_scpScript ) : bool
p_scpScript IScript
return bool

Execute() public method

Executes the script.
public Execute ( IScript p_scpScript ) : bool
p_scpScript IScript
return bool

OnTaskSetCompleted() protected method

Raises the TaskSetCompleted event.
protected OnTaskSetCompleted ( TaskSetCompletedEventArgs e ) : void
e Nexus.Client.BackgroundTasks.TaskSetCompletedEventArgs A describing the task that was started.
return void

OnTaskSetCompleted() protected method

Raises the TaskSetCompleted event.
protected OnTaskSetCompleted ( bool p_booSuccess, string p_strMessage, IScript p_scpExecutedScript ) : void
p_booSuccess bool Whether or not the task set completed successfully.
p_strMessage string The message of the completed task set.
p_scpExecutedScript IScript The script that was executed.
return void

OnTaskStarted() protected method

Raises the TaskStarted event.
protected OnTaskStarted ( EventArgs e ) : void
e EventArgs An describing the task that was started.
return void

OnTaskStarted() protected method

Raises the TaskStarted event.
protected OnTaskStarted ( IBackgroundTask p_bgtTask ) : void
p_bgtTask IBackgroundTask The task that was started.
return void

Wait() public method

Blocks until the task set is completed.
public Wait ( ) : void
return void