Exemple #1
0
        public static BatchFile Load(TextReader reader)
        {
            var statements = new List <CommandStatement>();

            string line;

            while ((line = reader.ReadLine()) != null)
            {
                if (!string.IsNullOrWhiteSpace(line))
                {
                    statements.Add(StatementParser.Parse(line));
                }
            }

            return(new BatchFile(statements));
        }
Exemple #2
0
 public BatchInstance(BatchFile batch, string arguments)
 {
     this.Batch     = batch;
     this.arguments = StatementParser.ParseArguments(arguments);
 }