Exemplo n.º 1
0
        static void Main(string[] args)
        {
            //setup the servicelocator
            ServiceLocator locator = ServiceLocator.Instance;

            locator.AddService(typeof(IFileSystem), new FileSystemWrapper());
            locator.AddService(typeof(ProcessSettings), SettingsFactory.CreateProcessSettings());
            locator.AddService(typeof(IBuildServiceFacade), new ClientFacade());
            locator.AddService(typeof(ILogger), new ConsoleLogger());

            bool everythingOk = true;

            try
            {
                locator.GetService <ProcessSettings>().Validate();
            }
            catch (Exception ex)
            {
                locator.GetService <ILogger>().Log(ex.Message);
                everythingOk = false;
            }

            if (everythingOk)
            {
                _watcher = new SubmitWatcher();
                Console.WriteLine("Start watching for submits to process.. Press enter to quit.");
                _watcher.StartWatching();
            }

            Console.ReadLine();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            //setup the servicelocator
            ServiceLocator locator = ServiceLocator.Instance;
            locator.AddService(typeof(IFileSystem), new FileSystemWrapper());
            locator.AddService(typeof(ProcessSettings), SettingsFactory.CreateProcessSettings());
            locator.AddService(typeof(IBuildServiceFacade), new ClientFacade());
            locator.AddService(typeof(ILogger), new ConsoleLogger());

            bool everythingOk = true;
            try
            {
                locator.GetService<ProcessSettings>().Validate();
            }
            catch (Exception ex)
            {
                locator.GetService<ILogger>().Log(ex.Message);
                everythingOk = false;
            }

            if (everythingOk)
            {
                _watcher = new SubmitWatcher();
                Console.WriteLine("Start watching for submits to process.. Press enter to quit.");
                _watcher.StartWatching();
            }

            Console.ReadLine();
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            _watcher = new SubmitWatcher();
            Console.WriteLine("Start watching for submits to process.. Press enter to quit.");
            _watcher.StartWatching();

            Console.ReadLine();
        }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            _watcher = new SubmitWatcher();
            Console.WriteLine("Start watching for submits to process.. Press enter to quit.");
            _watcher.StartWatching();

            Console.ReadLine();
        }