Skip to content

TypeExtensions class

Contains several useful extensions for reflection types and structures.

public static class Korzh.EasyQuery.TypeExtensions
TypeNameDescription
IEnumerable<PropertyInfo>GetMappedProperties(this IEnumerable<PropertyInfo> source)Filters the list of properties (defined by source parameter) to return only those which does not have “NotMapped” attribute.
BooleanIsAttributeDefined(this PropertyInfo pi, String attrName)Determines whether the attribute with specified name is defined for the property.
BooleanIsComplexType(this Type typeToCheck)Determines whether the specified type is complex type (marked by ComplexType attribute).
BooleanIsEnum(this Type typeToCheck)Determines whether the specified type is an enumeration.
BooleanIsGenericType(this Type typeToCheck)Determines whether the specified type is generic type.
BooleanIsInheritedFrom(this Type type, String fullTypeName)Determines whether the type is inherited from another type specified by the specified full type name.
BooleanIsInheritedFrom(this Type type, Type baseType)Determines whether the type is inherited from another type specified by the specified full type name.
BooleanIsInheritedFromGeneric(this Type type, Type baseType)Determines whether the type is inherited from generic type.
BooleanIsNullable(this Type typeToCheck)Determines whether the specified type is a nullable type.
BooleanIsPrimaryKey(this PropertyInfo pi)Determines whether specified property is a primary key.
BooleanIsSimpleType(this Type t)Checks if the type can be used in columns and conditions