//Load Configuration public void LoadConfig(string configuration) { GeometryServiceProvider.Instance = new NetTopologySuite.NtsGeometryServices(); using (StreamReader reader = new StreamReader(configuration)) { config = JsonConvert.DeserializeObject <Configuration>(reader.ReadToEnd()); schema = new CacheSchema(config.schema); ConnectRegisterDB(config.registerdb); rawCaches.Clear(); foreach (var cache_conf in config.caches) { if (!rawCaches.ContainsKey(cache_conf.name)) { CacheInfo cache = new CacheInfo(cache_conf.path); rawCaches.Add(cache_conf.name, cache); } } } }
public void SetCurrentCache(string path) { currentCache = new CacheInfo(path); schema = currentCache.Schema; }
public CacheInfo(string root) { Schema = new CacheSchema(root + "/Conf.xml"); Root = root; }