public ConstructionYard(IDeployerFactory factory, string rootDir)
        {
            _factory = factory;
            _rootDir = rootDir;
            _garbage = _factory.CreateGarbage();
            _logger = _factory.CreateLogger();
            _persist = _factory.CreatePersistence();

            var smallIo = _factory.CreateSmallTextIo(_persist);
            var jsonPersist = new JsonPersistence(smallIo);
            var slugCreator = new SlugCreator();
            _configService = new RealConfigurationService(_rootDir, jsonPersist, slugCreator);
        }
        public ConstructionYard(IDeployerFactory factory, string rootDir)
        {
            _factory = factory;
            _rootDir = rootDir;
            _garbage = _factory.CreateGarbage();
            _logger  = _factory.CreateLogger();
            _persist = _factory.CreatePersistence();

            var smallIo     = _factory.CreateSmallTextIo(_persist);
            var jsonPersist = new JsonPersistence(smallIo);
            var slugCreator = new SlugCreator();

            _configService = new RealConfigurationService(_rootDir, jsonPersist, slugCreator);
        }
示例#3
0
 private void StopEverything()
 {
     if (_controller != null)
     {
         _controller.Stop();
         _controller.Dispose();
         _controller = null;
     }
     if (_webServer != null)
     {
         _webServer.Stop();
         _webServer.Dispose();
         _webServer = null;
     }
     _factory.CreateGarbage().Collect();
 }