Example #1
0
        private void ProcessFeatureDescriptor(ShapeTableBuilder builder, FeatureDescriptor featureDescriptor)
        {
            var virtualPath = _fileSystem
                              .GetExtensionFileProvider(featureDescriptor.Extension, _logger)
                              .GetFileInfo("Placement.info");

            var placementFile = _placementFileParser.Parse(virtualPath);

            if (placementFile != null)
            {
                ProcessPlacementFile(builder, featureDescriptor, placementFile);
            }
        }
Example #2
0
        private void ProcessFeatureDescriptor(ShapeTableBuilder builder, FeatureDescriptor featureDescriptor)
        {
            var virtualPath = _fileSystem
                              .GetExtensionFileProvider(featureDescriptor.Extension, _logger)
                              .GetFileInfo("placement.json");

            if (virtualPath.Exists)
            {
                using (var stream = virtualPath.CreateReadStream())
                {
                    using (var reader = new StreamReader(stream))
                    {
                        using (var jtr = new JsonTextReader(reader))
                        {
                            JsonSerializer serializer    = new JsonSerializer();
                            var            placementFile = serializer.Deserialize <PlacementFile>(jtr);
                            ProcessPlacementFile(builder, featureDescriptor, placementFile);
                        }
                    }
                }
            }
        }