Example #1
0
 public void Execute()
 {
     ConfigurationBuilder configuration = null;
     try
     {
         configuration = new ConfigurationBuilder("configuration.yaml");
     }
     catch (SerializationException ex)
     {
         Console.ForegroundColor = ConsoleColor.Red;
         Console.WriteLine(String.Format("{0} \n{1}", "There was a problem with the deserializing of your configuration file. Here are the details.", ex.Message));
         Console.ResetColor();
         return;
     }
     var runner = configuration.Build();
     try
     {
         if (runner.Run())
         {
             Console.ReadLine();
         }
     }
     catch (GuardException ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
Example #2
0
 static void Main(string[] args)
 {
     string workingPath = args.FirstOrDefault() ?? AppDomain.CurrentDomain.BaseDirectory;
     var configuration = new ConfigurationBuilder("configuration.yaml");
     var runner = configuration.Build();
     runner.Run(workingPath);
     System.Console.ReadLine();
 }