/// <summary>
 /// Конструктор объекта управления сервером
 /// </summary>
 /// <param name="daysSecond">Секундный эквивалент дня</param>
 public ControlServerDB(int daysSecond)
 {
     WorkClientGroup = new GroupImitationClientActivity(this);
     WorkMongo       = new MongoDbSDB(this);
     WorkMySQL       = new MySqlSDB(this);
     MutexOnlyMethod = new Mutex();
     DaysSecond      = daysSecond;
     WorkRabbit      = new RabbitmqSDB(this);
 }
예제 #2
0
 /// <summary>
 /// Конструктор объекта имитации деятельности клиента
 /// </summary>
 /// <param name="clientServer"></param>
 /// <param name="serverDB"></param>
 public ImitationClientActivity(ClientServerDB clientServer, ControlServerDB serverDB)
 {
     ServerDB            = serverDB;
     ClientServer        = clientServer;
     ImitationActivity   = new Thread(new ThreadStart(GettingAndReadingBook));
     MutexJointOperation = new Mutex();
     MySqlConnection     = new MySqlSDB(ServerDB);
     MongoConnection     = new MongoDbSDB(ServerDB);
     WaitHandler         = new AutoResetEvent(true);
 }