Example #1
0
 protected static bool FinishDefaultAction(BaseOptions opt, int numberOfActionsPerformed = 0)
 {
     if (!opt.PerformActions && numberOfActionsPerformed > 0)
     {
         Console.WriteLine(Environment.NewLine + "This was verbose only, perform actions [y/N]?");
         var key = Console.ReadKey();
         if (key.KeyChar.ToString().ToLowerInvariant().Equals("y"))
         {
             return true;
         }
     }
     else
     {
         Console.WriteLine("Done..");
     }
     return false;
 }
Example #2
0
 protected static string StartDefaultAction(BaseOptions opt)
 {
     Console.WriteLine(Environment.NewLine + "Starting..");
     if (!opt.PerformActions)
     {
         Console.WriteLine("No option -p found: Verbose test run only");
     }
     string dir = opt.Directory;
     Console.WriteLine("Directory specified: " + dir);
     if (!Directory.Exists(dir))
     {
         dir = Path.Combine(Environment.CurrentDirectory, dir);
         //Maybe a relative dir?
         if (!Directory.Exists(dir))
         {
             throw new Exception("Directory invalid: " + opt.Directory);
         }
     }
     Console.WriteLine("");
     Console.WriteLine("Scanning " + dir);
     return dir;
 }