Esempio n. 1
0
        /// <inheritdoc />
        public void Configure(IConfigSection configSection)
        {
            var stringPath  = _pathResolver.Resolve(configSection.GetString("data/index/strings"));
            var mapDataPath = _pathResolver.Resolve(configSection.GetString("data/index/spatial"));
            var elePath     = _pathResolver.Resolve(configSection.GetString("data/elevation/local"));

            string errorMsg = null;

            CoreLibrary.Configure(stringPath, mapDataPath, elePath, error => errorMsg = error);
            if (errorMsg != null)
            {
                throw new MapDataException(errorMsg);
            }
        }
Esempio n. 2
0
        /// <inheritdoc />
        public void Configure(IConfigSection configSection)
        {
            _mapDataServerUri       = configSection.GetString(@"data/remote/server", null);
            _mapDataServerQuery     = configSection.GetString(@"data/remote/query", null);
            _mapDataFormatExtension = "." + configSection.GetString(@"data/remote/format", "xml");
            _cachePath = configSection.GetString(@"data/cache", null);

            var stringPath  = _pathResolver.Resolve(configSection.GetString("data/index/strings"));
            var mapDataPath = _pathResolver.Resolve(configSection.GetString("data/index/spatial"));
            var elePath     = _pathResolver.Resolve(configSection.GetString("data/elevation/local"));

            string errorMsg = null;

            CoreLibrary.Configure(stringPath, mapDataPath, elePath, error => errorMsg = error);
            if (errorMsg != null)
            {
                throw new MapDataException(errorMsg);
            }
        }