/// <summary> /// Execute the next command. /// </summary> /// <param name="parameters">The command executation parameters object.</param> /// <returns>If executed returns true.</returns> public bool DoNext(object parameters = null) { if (Unexecuted.Count > 0) { Current = Unexecuted.Dequeue(); try { Current.Execute(parameters); } catch (Exception e) { throw e; } Index++; return(true); } return(false); }
/// <summary> /// Reset and clear the pipe /// </summary> public void Reset() { Executed.Clear(); Unexecuted.Clear(); Index = 0; }