Esempio n. 1
0
        static string[] Parse(string source, int max)
        {
            string[] values = new string [max];
            int      i      = 0;

            foreach (string s in ArgumentSource.GetArguments(new StringReader(source)))
            {
                if (i < (values.Length - 1))
                {
                    values [i++] = s;
                }
                else
                {
                    values [i] = values [i] == null ? s : values [i] + " " + s;
                }
            }
            return(values);
        }
Esempio n. 2
0
 public static ImmutableList <string> GetArgumentList(string args)
 {
     using (var tr = new StringReader(args))
         return(ArgumentSource.GetArguments(tr).ToImmutableList());
 }