Skip to main content

typeextensions-class

Contains several useful extensions for reflection types and structures.

public static class Korzh.EasyQuery.TypeExtensions

Assembly: Korzh.EasyQuery.dll

Static Methods

NameTypeDescription
GetMappedProperties(this IEnumerable<PropertyInfo> source)IEnumerable<PropertyInfo>Filters the list of properties (defined by source parameter) to return only those which does not have "NotMapped" attribute.
IsAttributeDefined(this PropertyInfo pi, string attrName)boolDetermines whether the attribute with specified name is defined for the property.
IsComplexType(this Type typeToCheck)boolDetermines whether the specified type is complex type (marked by ComplexType attribute).
IsEnum(this Type typeToCheck)boolDetermines whether the specified type is an enumeration.
IsGenericType(this Type typeToCheck)boolDetermines whether the specified type is generic type.
IsInheritedFrom(this Type type, string fullTypeName)boolDetermines whether the type is inherited from another type specified by the specified full type name.
IsInheritedFrom(this Type type, Type baseType)boolDetermines whether the type is inherited from another type specified by the specified full type name.
IsInheritedFromGeneric(this Type type, Type baseType)boolDetermines whether the type is inherited from generic type.
IsNullable(this Type typeToCheck)boolDetermines whether the specified type is a nullable type.
IsPrimaryKey(this PropertyInfo pi)boolDetermines whether specified property is a primary key.
IsSimpleType(this Type t)boolChecks if the type can be used in columns and conditions