Пример #1
0
        static void Main(string[] args)
        {
            var options = new CLOptions();

            Console.WriteLine(GetGilesFunnyLine());

            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;

            var parser = new CommandLineParser(
                new CommandLineParserSettings(false, Console.Error));

            if (!parser.ParseArguments(args, options))
            {
                Console.WriteLine("Unable to determine what command lines arguments were used, check the help above!\nThe minimum needed is the -s [solution file path].");
                Environment.Exit(1);
            }

            config = GetGilesConfigFor(options);

            kernel = new StandardKernel(new SlayerModule(config));

            ConsoleSetup();

            sourceWatcher = StartSourceWatcher();

            menuOptions = GetInteractiveMenuOptions();

            DisplayInteractiveMenuOptions();

            MainFeedbackLoop();
        }
Пример #2
0
 public SourceWatcher(IBuildRunner buildRunner, IFileSystem fileSystem,
                      IFileWatcherFactory fileWatcherFactory, GilesConfig config)
 {
     FileWatchers            = new List <FileSystemWatcher>();
     this.fileSystem         = fileSystem;
     this.buildRunner        = buildRunner;
     this.fileWatcherFactory = fileWatcherFactory;
     this.config             = config;
     buildDelayTimer         = new Timer {
         AutoReset = false, Enabled = false, Interval = config.BuildDelay
     };
     config.PropertyChanged  += config_PropertyChanged;
     buildDelayTimer.Elapsed += (sender, e) => RunNow();
 }
Пример #3
0
        static void Main(string[] args)
        {
            var options = new CLOptions();

            var parser = new CommandLineParser(
                new CommandLineParserSettings(false, Console.Error));

            if (!parser.ParseArguments(args, options))
            {
                Environment.Exit(1);
            }

            Console.Clear();
            Console.CancelKeyPress += Console_CancelKeyPress;
            Console.WriteLine("Giles - your own personal watcher");

            var solutionPath     = options.SolutionPath;
            var testAssemblyPath = options.TestAssemblyPath;
            var projectRoot      = options.ProjectRoot;

            var kernel = new StandardKernel(new SlayerModule(solutionPath, testAssemblyPath, projectRoot));

            var configFactory = kernel.Get <GilesConfigFactory>();

            config = configFactory.Build();

            sourceWatcher = kernel.Get <SourceWatcher>();

            sourceWatcher.Watch(solutionPath, @"*.cs");

            DisplayOptions();

            MainFeedbackLoop();

            Console.WriteLine("See you next time...");
        }
Пример #4
0
 public GilesTestListener(GilesConfig config) : this()
 {
     this.config = config;
 }
Пример #5
0
 public BuildRunner(GilesConfig config, Settings settings)
 {
     this.config = config;
     this.settings = settings;
 }
Пример #6
0
 public TestRunner(GilesConfig config)
 {
     this.config = config;
 }
Пример #7
0
 public SlayerModule(GilesConfig config)
 {
     this.config = config;
 }