TypeExtensions class

Contains several useful extensions for reflection types and structures.

public static class Korzh.EasyQuery.TypeExtensions

Package: Korzh.EasyQuery (targets: netstandard2.0)

Assembly: Korzh.EasyQuery.dll

Static Methods

Name Type Description
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) bool Determines whether the attribute with specified name is defined for the property.
IsComplexType(this Type typeToCheck) bool Determines whether the specified type is complex type (marked by ComplexType attribute).
IsEnum(this Type typeToCheck) bool Determines whether the specified type is an enumeration.
IsGenericType(this Type typeToCheck) bool Determines whether the specified type is generic type.
IsInheritedFrom(this Type type, string fullTypeName) bool Determines whether the type is inherited from another type specified by the specified full type name.
IsInheritedFrom(this Type type, Type baseType) bool Determines whether the type is inherited from another type specified by the specified full type name.
IsInheritedFromGeneric(this Type type, Type baseType) bool Determines whether the type is inherited from generic type.
IsNullable(this Type typeToCheck) bool Determines whether the specified type is a nullable type.
IsPrimaryKey(this PropertyInfo pi) bool Determines whether specified property is a primary key.
IsSimpleType(this Type t) bool Checks if the type can be used in columns and conditions