public static PropertyInfoMetaDataCollection GetValidProperties(this DynamicListView instance, IEnumerable <Type> types) { PropertyInfoMetaDataCollection returnValue = new PropertyInfoMetaDataCollection(); foreach (var type in types) { int ordinal = 0; foreach (var property in instance.GetValidProperties(type)) { returnValue.Add(property.Name, new PropertyInfoMetaData(property, ordinal)); ordinal++; } } return(returnValue); }
public static IEnumerable <PropertyInfo> GetValidProperties(this DynamicListView instance, Type type) { return(type.GetProperties().AsParallel().Where(property => IsPropertyValid(property))); }