public MainActivity() { _dataDir = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal); _clientConfigPath = "/sdcard/client.json"; _configStore = new SyncServiceConfigStore(_clientConfigPath); }
public void ServerConfig_Test() { var store = new SyncServiceConfigStore(@"D:\Taras\stest\main.json"); var conf = store.ReadServiceOrDefault(); if (conf.Endpoints == null) { conf.Endpoints = new List <SyncEndpointConfigModel>(); } conf.Endpoints.Add(new SyncEndpointConfigModel { BaseDir = @"D:\Taras\stest", DbDir = @"D:\Taras\stest\.sync", SyncMode = SyncMode.TwoWay, }); store.Save(conf); }
public void ClientConfig_Test() { var store = new SyncServiceConfigStore(@"D:\Taras\stest\client.json"); var conf = store.ReadClientOrDefault(); if (conf.Pairs == null) { conf.Pairs = new List <SyncPairConfigModel>(); } conf.Pairs.Add(new SyncPairConfigModel { BaseDir = @"/storage/emulated/0/stest", DbDir = @"/storage/emulated/0/stest/.sync", SyncMode = SyncMode.TwoWay, ServerAddress = "127.0.0.2", ServerPort = "-111", }); store.Save(conf); }