private void Initialize() { Directory.CreateDirectory(_path + "Replication"); Directory.CreateDirectory(_path + "Replication" + _S + "Inbox"); Directory.CreateDirectory(_path + "Replication" + _S + "Outbox"); _InboxPath = _path + "Replication" + _S + "Inbox" + _S; _OutboxPath = _path + "Replication" + _S + "Outbox" + _S; // setup cron job _cron = new CronDaemon(); _clientConfig = new ClientRepConfig(); // read what config if (File.Exists(_path + "Replication" + _S + "branch.dat")) _clientConfig = fastBinaryJSON.BJSON.ToObject<ClientRepConfig>(File.ReadAllBytes(_path + "Replication" + _S + "branch.dat")); // starting jobs _cron.AddJob(_clientConfig.whencron, Replicate); }
private void Initialize() { Directory.CreateDirectory(_path + "Replication"); Directory.CreateDirectory(_path + "Replication" + _S + "Inbox"); Directory.CreateDirectory(_path + "Replication" + _S + "Outbox"); _InboxPath = _path + "Replication" + _S + "Inbox" + _S; _OutboxPath = _path + "Replication" + _S + "Outbox" + _S; // setup cron job _cron = new CronDaemon(); _clientConfig = new ClientRepConfig(); // read what config if (File.Exists(_path + "Replication" + _S + "branch.dat")) { _clientConfig = fastBinaryJSON.BJSON.ToObject <ClientRepConfig>(File.ReadAllBytes(_path + "Replication" + _S + "branch.dat")); } // starting jobs _cron.AddJob(_clientConfig.whencron, Replicate); }