Class TypeHelper
Inheritance
System.Object
TypeHelper
Assembly: Volo.Abp.Core.dll
Syntax
public static class TypeHelper : object
Methods
ConvertFrom(Type, Object)
Declaration
public static object ConvertFrom(Type targetType, object value)
Parameters
| Type |
Name |
Description |
| Type |
targetType |
|
| System.Object |
value |
|
Returns
| Type |
Description |
| System.Object |
|
ConvertFrom<TTargetType>(Object)
Declaration
public static object ConvertFrom<TTargetType>(object value)
Parameters
| Type |
Name |
Description |
| System.Object |
value |
|
Returns
| Type |
Description |
| System.Object |
|
Type Parameters
| Name |
Description |
| TTargetType |
|
ConvertFromString(Type, String)
Declaration
public static object ConvertFromString(Type targetType, string value)
Parameters
| Type |
Name |
Description |
| Type |
targetType |
|
| System.String |
value |
|
Returns
| Type |
Description |
| System.Object |
|
ConvertFromString<TTargetType>(String)
Declaration
public static object ConvertFromString<TTargetType>(string value)
Parameters
| Type |
Name |
Description |
| System.String |
value |
|
Returns
| Type |
Description |
| System.Object |
|
Type Parameters
| Name |
Description |
| TTargetType |
|
GetDefaultValue(Type)
Declaration
public static object GetDefaultValue(Type type)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
Returns
| Type |
Description |
| System.Object |
|
GetDefaultValue<T>()
Declaration
public static T GetDefaultValue<T>()
Returns
Type Parameters
GetFirstGenericArgumentIfNullable(Type)
Declaration
public static Type GetFirstGenericArgumentIfNullable(this Type t)
Parameters
| Type |
Name |
Description |
| Type |
t |
|
Returns
GetFullNameHandlingNullableAndGenerics(Type)
Declaration
public static string GetFullNameHandlingNullableAndGenerics(Type type)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
Returns
| Type |
Description |
| System.String |
|
GetSimplifiedName(Type)
Declaration
public static string GetSimplifiedName(Type type)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
Returns
| Type |
Description |
| System.String |
|
IsDefaultValue(Object)
Declaration
public static bool IsDefaultValue(object obj)
Parameters
| Type |
Name |
Description |
| System.Object |
obj |
|
Returns
| Type |
Description |
| System.Boolean |
|
IsDictionary(Type, out Type, out Type)
Declaration
public static bool IsDictionary(Type type, out Type keyType, out Type valueType)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
| Type |
keyType |
|
| Type |
valueType |
|
Returns
| Type |
Description |
| System.Boolean |
|
IsEnumerable(Type, out Type, Boolean)
Declaration
public static bool IsEnumerable(Type type, out Type itemType, bool includePrimitives = true)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
| Type |
itemType |
|
| System.Boolean |
includePrimitives |
|
Returns
| Type |
Description |
| System.Boolean |
|
IsFloatingType(Type, Boolean)
Declaration
public static bool IsFloatingType(Type type, bool includeNullable = true)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
| System.Boolean |
includeNullable |
|
Returns
| Type |
Description |
| System.Boolean |
|
IsFunc(Object)
Declaration
public static bool IsFunc(object obj)
Parameters
| Type |
Name |
Description |
| System.Object |
obj |
|
Returns
| Type |
Description |
| System.Boolean |
|
IsFunc<TReturn>(Object)
Declaration
public static bool IsFunc<TReturn>(object obj)
Parameters
| Type |
Name |
Description |
| System.Object |
obj |
|
Returns
| Type |
Description |
| System.Boolean |
|
Type Parameters
IsNonNullablePrimitiveType(Type)
Declaration
public static bool IsNonNullablePrimitiveType(Type type)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
Returns
| Type |
Description |
| System.Boolean |
|
IsNullable(Type)
Declaration
public static bool IsNullable(Type type)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
Returns
| Type |
Description |
| System.Boolean |
|
IsPrimitiveExtended(Type, Boolean, Boolean)
Declaration
public static bool IsPrimitiveExtended(Type type, bool includeNullables = true, bool includeEnums = false)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
| System.Boolean |
includeNullables |
|
| System.Boolean |
includeEnums |
|
Returns
| Type |
Description |
| System.Boolean |
|
StripNullable(Type)
Declaration
public static Type StripNullable(Type type)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
Returns