public void Execute <TModel, TResult>(ProcPage <TModel, TResult> page) { foreach (ActionItem a in this.actions) { if (a.Sql != null) { page.WriteLiteral(a.Sql); } if (a.Result != null) { page.Write(a.Result(page.R)); } if (a.Model != null) { page.Write(a.Model(page.M)); } } }
public void Execute(ISqlPage page) { ProcPage <IRunnable, object> proc = (ProcPage <IRunnable, object>)page; foreach (ActionItem a in this.actions) { if (a.Sql != null) { proc.WriteLiteral(a.Sql); } if (a.Result != null) { proc.Write(a.Result(proc.R)); } if (a.Model != null) { proc.Write(a.Model(proc.M)); } } }