Show / Hide Table of Contents

Class TypeExtensions

Inheritance
System.Object
TypeExtensions
Namespace: Paradigm.ORM.Data.Extensions
Assembly: Paradigm.ORM.Data.dll
Syntax
public static class TypeExtensions : object

Methods

| Improve this Doc View Source

GetDefaultValue(Type)

Gets the default value of a given type.

Declaration
public static object GetDefaultValue(this Type type)
Parameters
Type Name Description
Type type

The type.

Returns
Type Description
System.Object

Default value.

| Improve this Doc View Source

GetParentTypes(Type)

Gets a list of all the base types and interfaces.

Declaration
public static HashSet<Type> GetParentTypes(this Type type)
Parameters
Type Name Description
Type type

Type to extract parents.

Returns
Type Description
HashSet<Type>

A lis

| Improve this Doc View Source

GetPropertyInfo<TType>(Expression<Func<TType, Object>>)

Gets the property information from an expression of the type (x => x.ProperyName).

Declaration
public static PropertyInfo GetPropertyInfo<TType>(Expression<Func<TType, object>> expression)
Parameters
Type Name Description
Expression<Func<TType, System.Object>> expression

A expression returning a property.

Returns
Type Description
PropertyInfo

A instance of the referenced property.

Type Parameters
Name Description
TType

A .NET type.

| Improve this Doc View Source

GetPropertyInfo<TType, TProperty>(Expression<Func<TType, TProperty>>)

Gets the property information from an expression of the type (x => x.ProperyName).

Declaration
public static PropertyInfo GetPropertyInfo<TType, TProperty>(Expression<Func<TType, TProperty>> expression)
Parameters
Type Name Description
Expression<Func<TType, TProperty>> expression

A expression returning a property of type

Returns
Type Description
PropertyInfo

A instance of the referenced property.

Type Parameters
Name Description
TType

A .NET type.

TProperty

The type of a property inside .

  • Improve this Doc
  • View Source
Powered by MiracleDevs ©2017. Code licensed under the MIT License.
Documentation generated by DocFX.