C# Class TreeSharp.Action

The base Action class. A simple, easy to use, way to execute actions, and return their status of execution. These are normally considered 'atoms' in that they are executed in their entirety.
Inheritance: Composite
显示文件 Open project: lances101/BoringHeroes Class Usage Examples

Public Methods

Method Description
Action ( ) : System.Collections.Generic
Action ( ActionDelegate action = null ) : System.Collections.Generic
Action ( ActionSucceedDelegate action = null ) : System.Collections.Generic
Execute ( object context ) : IEnumerable

Protected Methods

Method Description
Run ( object context ) : RunStatus

Runs this action, and returns a RunStatus describing it's current state of execution. If this method is not overriden, it returns RunStatus.Failure.

Method Details

Action() public method

public Action ( ) : System.Collections.Generic
return System.Collections.Generic

Action() public method

public Action ( ActionDelegate action = null ) : System.Collections.Generic
action ActionDelegate
return System.Collections.Generic

Action() public method

public Action ( ActionSucceedDelegate action = null ) : System.Collections.Generic
action ActionSucceedDelegate
return System.Collections.Generic

Execute() public final method

public final Execute ( object context ) : IEnumerable
context object
return IEnumerable

Run() protected method

Runs this action, and returns a RunStatus describing it's current state of execution. If this method is not overriden, it returns RunStatus.Failure.
protected Run ( object context ) : RunStatus
context object
return RunStatus