public void Execute(SqlConnection connection, IScriptExecuteCallback callback) { if (connection == null) { throw new ArgumentNullException("connection"); } if (callback == null) { throw new ArgumentNullException("callback"); } int index = 0; ScriptStep stepToRun; callback.ExecutionStarting(this); while (index < Count) { stepToRun = this[index]; if (!callback.Progress(stepToRun, index + 1, Count)) { break; } stepToRun.Execute(connection, callback); index++; } }
public void Execute(SqlConnection connection, IScriptExecuteCallback callback) { if (connection == null) throw new ArgumentNullException("connection"); if (callback== null) throw new ArgumentNullException("callback"); int index=0; ScriptStep stepToRun; callback.ExecutionStarting(this); while (index < Count) { stepToRun = this[index]; if (!callback.Progress(stepToRun, index + 1, Count)) break; stepToRun.Execute(connection, callback); index++; } }