static PropertyDescriptor[] GetAggregateProperties(ExternalizedMapping property, PropertyDescriptorCollection[] components) { var propertyType = default(Type); var properties = new PropertyDescriptor[components.Length]; for (int i = 0; i < properties.Length; i++) { var descriptor = components[i][property.Name]; if (descriptor == null) { return(EmptyProperties); } if (propertyType == null) { propertyType = descriptor.PropertyType; } else if (descriptor.PropertyType != propertyType) { return(EmptyProperties); } properties[i] = descriptor; } return(properties); }
public ExternalizedPropertyDescriptor(ExternalizedMapping property, PropertyDescriptor[] descriptors, object[] components) : base(property.ExternalizedName, null) { instances = components; properties = descriptors; description = property.Description; category = property.Category; if (description == string.Empty) { description = null; } if (category == string.Empty) { category = null; } }
public ExternalizedMappingPropertyDescriptor(ExternalizedMapping mapping) : base(mapping.Name, DescriptorAttributes) { this.mapping = mapping; }