コード例 #1
0
        private static ArticyData.Features ConvertFeatures(FeaturesType features)
        {
            List <ArticyData.Feature> articyDataFeatures = new List <ArticyData.Feature>();

            if ((features != null) && (features.Feature != null))
            {
                foreach (FeatureType feature in features.Feature)
                {
                    var articyDataFeature = new ArticyData.Feature();
                    foreach (PropertiesType properties in feature.Properties)
                    {
                        if (properties != null && properties.Items != null && properties.Items.Length > 0)
                        {
                            var articyDataFields = new List <Field>();
                            foreach (object item in properties.Items)
                            {
                                ConvertItem(item, articyDataFields);
                            }
                            articyDataFeature.properties.Add(new ArticyData.Property(articyDataFields));
                        }
                    }
                    articyDataFeatures.Add(articyDataFeature);
                }
            }
            return(new ArticyData.Features(articyDataFeatures));
        }
コード例 #2
0
 private static ArticyData.Features ConvertFeatures(FeaturesType features)
 {
     List<ArticyData.Feature> articyDataFeatures = new List<ArticyData.Feature>();
     if ((features != null) && (features.Feature != null)) {
         foreach (FeatureType feature in features.Feature) {
             var articyDataFeature = new ArticyData.Feature();
             foreach (PropertiesType properties in feature.Properties) {
                 if (properties != null && properties.Items != null && properties.Items.Length > 0) {
                     var articyDataFields = new List<Field>();
                     foreach (object item in properties.Items) {
                         ConvertItem(item, articyDataFields);
                     }
                     articyDataFeature.properties.Add(new ArticyData.Property(articyDataFields));
                 }
             }
             articyDataFeatures.Add(articyDataFeature);
         }
     }
     return new ArticyData.Features(articyDataFeatures);
 }