ScriptRunner takes a number of ScriptCommand and rum them using ScriptCommand.Run() or RunAsync() method sequentially.

Variables are used to supply parameter when running, or transporting information between ScriptCommands.

In most case, ScriptCommand.Run/Async() method returns another ScriptCommand, and ScriptRunner will add it to the queue, but if the ScriptCommand returns ResultCommand.Error(), the run operation halt immediately with the error is thrown as exception.

public interface IScriptRunner
{
        void Run(Queue<IScriptCommand> cmds, ParameterDic initialParameters);
        Task RunAsync(Queue<IScriptCommand> cmds, ParameterDic initialParameters);
}
 public static partial class ExtensionMethods
{
    public static void Run(this IScriptRunner scriptRunner, ParameterDic initialParameters, params IScriptCommand[] cmds)
     
    public static async Task RunAsync(this IScriptRunner scriptRunner, ParameterDic initialParameters, params IScriptCommand[] cmds)
      
}

Last edited Oct 18, 2014 at 8:58 AM by lycj, version 4

Comments

No comments yet.