Example #1
0
        private static CliInput ParseInput(string[] args)
        {
            var toReturn = new CliInput();

            if (args == null || args.Length <= 0 || string.IsNullOrWhiteSpace(args[0]))
            {
                return(null);
            }
            var options = args.Where(s => s.StartsWith("-")).Select(s => s.ToLowerInvariant()).ToList();

            toReturn.ClearDestinationFolder = options.Contains("-c");
            // start folder is expected to be the last argument.
            toReturn.StartFolder = Utils.MakeAbsolutePath(Environment.CurrentDirectory, args[args.Length - 1]);
            if (!Directory.Exists(toReturn.StartFolder))
            {
                return(null);
            }
            return(toReturn);
        }
Example #2
0
 public Engine(CliInput input)
 {
     _input = input;
 }
Example #3
0
 public Engine(CliInput input)
 {
     _input = input;
 }
Example #4
0
 private static CliInput ParseInput(string[] args)
 {
     var toReturn = new CliInput();
     if(args == null || args.Length <= 0 || string.IsNullOrWhiteSpace(args[0]))
     {
         return null;
     }
     var options = args.Where(s=>s.StartsWith("-")).Select(s=>s.ToLowerInvariant()).ToList();
     toReturn.ClearDestinationFolder = options.Contains("-c");
     // start folder is expected to be the last argument.
     toReturn.StartFolder = Utils.MakeAbsolutePath(Environment.CurrentDirectory, args[args.Length-1]);
     if(!Directory.Exists(toReturn.StartFolder))
     {
         return null;
     }
     return toReturn;
 }