Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }