Ejemplo n.º 1
0
        private PropertyDescriptorCollection SanitizeAndMergeProperties(PropertyDescriptorCollection propertiesOnMaster)
        {
            List <PropertyDescriptor> saneProperties = new List <PropertyDescriptor>();

            foreach (PropertyDescriptor propertyOnMaster in propertiesOnMaster)
            {
                if (CanPropertyBeOverriden(propertyOnMaster))
                {
                    MergedConfigurationProperty mergedProperty = new MergedConfigurationProperty(mergeData, propertyOnMaster, masterConfigurationNode, masterConfigurationNode.Hierarchy);

                    saneProperties.Add(mergedProperty);
                }
            }

            return(new PropertyDescriptorCollection(saneProperties.ToArray()));
        }
        private PropertyDescriptorCollection SanitizeAndMergeProperties(PropertyDescriptorCollection propertiesOnMaster)
        {
            List<PropertyDescriptor> saneProperties = new List<PropertyDescriptor>();
            foreach (PropertyDescriptor propertyOnMaster in propertiesOnMaster)
            {
                if (CanPropertyBeOverriden(propertyOnMaster))
                {
                    MergedConfigurationProperty mergedProperty = new MergedConfigurationProperty(mergeData, propertyOnMaster, masterConfigurationNode, masterConfigurationNode.Hierarchy);

                    saneProperties.Add(mergedProperty);
                }
            }

            return new PropertyDescriptorCollection(saneProperties.ToArray());
        }