C# Class Rebel.Framework.Tasks.DelegateTask

Represents a declarative task that runs a provided delegate when told to execute
Inheritance: AbstractTask
ファイルを表示 Open project: RebelCMS/rebelcmsxu5

Public Methods

Method Description
DelegateTask ( Action callback ) : System

Initializes a new instance of the DelegateTask class. Note that since this constructor has no IFrameworkContext parameter, the Context property of the base class AbstractTask will be null until the Execute method is called at which point the TaskExecutionContext.EventArgs.FrameworkContext property will be used to set it.

DelegateTask ( IFrameworkContext context, Action callback ) : System

Initializes a new instance of the DelegateTask class.

Execute ( TaskExecutionContext context ) : void

Executes this task instance.

Method Details

DelegateTask() public method

Initializes a new instance of the DelegateTask class. Note that since this constructor has no IFrameworkContext parameter, the Context property of the base class AbstractTask will be null until the Execute method is called at which point the TaskExecutionContext.EventArgs.FrameworkContext property will be used to set it.
public DelegateTask ( Action callback ) : System
callback Action The callback.
return System

DelegateTask() public method

Initializes a new instance of the DelegateTask class.
public DelegateTask ( IFrameworkContext context, Action callback ) : System
context IFrameworkContext The context.
callback Action The callback.
return System

Execute() public method

Executes this task instance.
public Execute ( TaskExecutionContext context ) : void
context TaskExecutionContext
return void