예제 #1
0
 //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);
             }
         }
     }
 }
예제 #2
0
 public void SetCurrentCache(string path)
 {
     currentCache = new CacheInfo(path);
     schema       = currentCache.Schema;
 }
예제 #3
0
 public CacheInfo(string root)
 {
     Schema = new CacheSchema(root + "/Conf.xml");
     Root   = root;
 }