Пример #1
0
        public static void Main(string[] args)
        {
            Configurator config;

            if (args.Length == 0)
            {
                config = new Configurator("DefaultConfig.xml");
            }
            else
            {
                config = new Configurator(args[0]);
            }

            ReplicationProcess replication = new ReplicationProcess(config);
            replication.OnStart();

            EventTimer tmr = new EventTimer(config.MainTimerValue, replication.OnTimedEvent);
            tmr.Start();
            Console.WriteLine("Press any key to exit...");
            Console.ReadKey();
        }
 /// <summary>
 /// Конструктор класса
 /// </summary>
 /// <param name="config">
 /// Конфигурация программы
 /// </param>
 public ReplicationProcess(Configurator config)
 {
     this._config = config;
     this.ConnectMaster(this._config.MaxDBErrorCount);
     this.ConnectSlave(this._config.MaxDBErrorCount);
 }
Пример #3
0
 /// <summary>
 /// Конструктор класса
 /// </summary>
 /// <param name="config">
 /// Конфигурация программы
 /// </param>
 public ReplicationProcess(Configurator config)
 {
     this._config = config;
     this.ConnectMaster(this._config.MaxDBErrorCount);
     this.ConnectSlave(this._config.MaxDBErrorCount);
 }