public static void Append(this Bulk bulk, ISelector filter, PipeLine pipeline) { var statement = new Statement() { Selector = filter, PipeLine = pipeline }; bulk.Append(statement); }
public static IWork InterpretDocument(string text, Context context) { Bulk bulk = new Bulk(); StringReader reader = new StringReader(text); bool ok; do { string statement = reader.ReadLine(); bool skip = (string.IsNullOrWhiteSpace(statement)) || (statement.StartsWith("//")); ok = (statement != null); if (skip) continue; if (ok) { IWork work = InterpretStatement(context, statement); bulk.Append(work); } } while (ok); return bulk; }
public static IWork InterpretDocument(string text, Context context) { Bulk bulk = new Bulk(); StringReader reader = new StringReader(text); bool ok; do { string statement = reader.ReadLine(); bool skip = (string.IsNullOrWhiteSpace(statement)) || (statement.StartsWith("//")); ok = (statement != null); if (skip) { continue; } if (ok) { IWork work = InterpretStatement(context, statement); bulk.Append(work); } }while (ok); return(bulk); }