internal static List <PropertyInfo> CollectionProperties(this Type type, ReflectionInformation.CollectionType collectionType, BindingFlags bindingFlags = BindingFlags.Public | BindingFlags.Instance) { List <PropertyInfo> listObjectTypeProperties = type.Properties(bindingFlags) .Where(property => property.PropertyType.Name.Contains(collectionType.ToString().ToLower() + "`")).ToList(); return(listObjectTypeProperties); }
internal static List <FieldInfo> CollectionFields(this Type type, ReflectionInformation.CollectionType collectionType, BindingFlags bindingFlags = BindingFlags.NonPublic | BindingFlags.Instance) { List <FieldInfo> listObjectTypeListFields = type.Fields(bindingFlags) .Where(field => field != null && field.FieldType.Name.ToLower().Contains(collectionType.ToString().ToLower() + "`")).ToList(); return(listObjectTypeListFields); }
internal static List <FieldInfo> CollectionFields(this object obj, ReflectionInformation.CollectionType collectionType, BindingFlags bindingFlags = BindingFlags.NonPublic | BindingFlags.Instance) { List <FieldInfo> listObjectTypeListFields = obj.GetType().CollectionFields(collectionType, bindingFlags); return(listObjectTypeListFields); }
internal static List <PropertyInfo> CollectionProperties(this object obj, ReflectionInformation.CollectionType collectionType, BindingFlags bindingFlags = BindingFlags.Public | BindingFlags.Instance) { List <PropertyInfo> listObjectTypeProperties = obj.GetType().CollectionProperties(collectionType, bindingFlags); return(listObjectTypeProperties); }