Ejemplo n.º 1
0
 public static string[] GetMultiple(string[] commandLineArgs, string key)
 {
     if (commandLineArgs.Contains(key))
     {
         var index = commandLineArgs.ToList().IndexOf(key);
         return(commandLineArgs.Skip(index + 1).TakeWhile(k => !ArgumentKey.IsKey(k)).ToArray());
     }
     return(null);
 }
Ejemplo n.º 2
0
 public static string GetSingle(string[] commandLineArgs, string key)
 {
     if (commandLineArgs.Contains(key))
     {
         var index = commandLineArgs.ToList().IndexOf(key);
         var parts = commandLineArgs.Skip(index + 1).TakeWhile(k => !ArgumentKey.IsKey(k)).ToArray();
         return(string.Join(" ", parts));
     }
     return(null);
 }