static void Main(string[] args) { using (var dbContext = new StockExchangeDBContext()) { XmlConfigurator.Configure(); var container = new Container(new DIContainer()); var loggerService = container.GetInstance <ILoggerService>(); var businessLogic = container.GetInstance <BusinessLogic>(); var simulator = container.GetInstance <ISimulation>(); Database.SetInitializer(new EFInitializer(businessLogic)); Task.Factory.StartNew(() => { simulator.Run(); }); Console.ReadLine(); simulator.IsContinue = false; Console.ReadLine(); } }
static void Main(string[] args) { using (var dbContext = new StockExchangeDBContext()) { XmlConfigurator.Configure(); var logger = LogManager.GetLogger("StockExchangeLogger"); var loggerService = new LoggerService(logger); var businessLogic = new BusinessLogic(dbContext, loggerService); var simulator = new Simulation(businessLogic, loggerService); Database.SetInitializer(new EFInitializer(businessLogic)); var clients = businessLogic.GetClients(); businessLogic.ShowClients(clients.ToList()); Console.WriteLine("\nClients in orange area:"); businessLogic.ShowClients(businessLogic.GetClientsFromOrangeZone()); Console.WriteLine("\nDeals are producing. Press Enter to stop producing/"); Task.Factory.StartNew(() => { simulator.Run(); }); Console.ReadLine(); simulator.IsContinue = false; Console.WriteLine("\nDeals producing stopped. Clients table is updated:"); businessLogic.ShowClients(clients.ToList()); Console.ReadLine(); } }
public ShareTypeTableRepository(StockExchangeDBContext dBContext) { this.dBContext = dBContext; }
public BlockedMoneyTableRepository(StockExchangeDBContext dBContext) { this.dBContext = dBContext; }
public ClientTableRepository(StockExchangeDBContext dBContext) { this.dBContext = dBContext; }
public BalanceTableRepository(StockExchangeDBContext dBContext) { this.dBContext = dBContext; }
public OperationTableRepository(StockExchangeDBContext dBContext) { this.dBContext = dBContext; }
public BlockedSharesNumberTableRepository(StockExchangeDBContext dBContext) { this.dBContext = dBContext; }