Example #1
0
        public static FspecOptionsFile Parse(string file)
        {
            var result = new FspecOptionsFile();

            foreach (var line in File.ReadAllLines(file))
            {
                result.Values.AddRange(ParseLine(line));
            }
            return(result);
        }
Example #2
0
        private List <string> ParseInternal(string[] args)
        {
            var myArgs = new List <string>(args.Length);

            if (!args.Contains("--no-config"))
            {
                foreach (FspecOptionsFile src in FspecOptionsFile.FindAll())
                {
                    myArgs.AddRange(src.Values);
                }
            }

            foreach (var item in args)
            {
                myArgs.Add(item);
            }
            return(OptionSet.Parse(myArgs));
        }