private static void Wait(StorageApi storage, List <DbFactory> factory) { var logger = LoggerFactory.CreateLoggerFromAppConfig("StorageAppMain", "StorageApp", "LoggerConfigurationSection"); Logger.InitializeLoggerInAssembly(logger, typeof(DistributorApi).Assembly); try { storage.Build(); factory.ForEach(x => storage.AddDbModule(x)); storage.Start(); Console.WriteLine("Press enter to stop"); Console.ReadLine(); } catch (Exception e) { logger.Error(e, ""); Console.ReadLine(); } storage.Dispose(); }