Class TypeHelper
Assembly: Volo.Abp.Core.dll
Syntax
public static class TypeHelper
Methods
ConvertFrom(Type, object)
Declaration
public static object ConvertFrom(Type targetType, object value)
Parameters
| Type |
Name |
Description |
| Type |
targetType |
|
| object |
value |
|
Returns
ConvertFromString(Type, string?)
Declaration
public static object? ConvertFromString(Type targetType, string? value)
Parameters
| Type |
Name |
Description |
| Type |
targetType |
|
| string |
value |
|
Returns
ConvertFromString<TTargetType>(string)
Declaration
public static object? ConvertFromString<TTargetType>(string value)
Parameters
| Type |
Name |
Description |
| string |
value |
|
Returns
Type Parameters
| Name |
Description |
| TTargetType |
|
ConvertFrom<TTargetType>(object)
Declaration
public static object ConvertFrom<TTargetType>(object value)
Parameters
| Type |
Name |
Description |
| object |
value |
|
Returns
Type Parameters
| Name |
Description |
| TTargetType |
|
GetDefaultValue(Type)
Declaration
public static object? GetDefaultValue(Type type)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
Returns
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
GetSimplifiedName(Type)
Declaration
public static string GetSimplifiedName(Type type)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
Returns
IsDefaultValue(object?)
Declaration
public static bool IsDefaultValue(object? obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
IsDictionary(Type, out Type?, out Type?)
Declaration
public static bool IsDictionary(Type type, out Type? keyType, out Type? valueType)
Parameters
Returns
IsEnumerable(Type, out Type?, bool)
Declaration
public static bool IsEnumerable(Type type, out Type? itemType, bool includePrimitives = true)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
| Type |
itemType |
|
| bool |
includePrimitives |
|
Returns
IsFloatingType(Type, bool)
Declaration
public static bool IsFloatingType(Type type, bool includeNullable = true)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
| bool |
includeNullable |
|
Returns
IsFunc(object?)
Declaration
public static bool IsFunc(object? obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
IsFunc<TReturn>(object?)
Declaration
public static bool IsFunc<TReturn>(object? obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Type Parameters
IsNonNullablePrimitiveType(Type)
Declaration
public static bool IsNonNullablePrimitiveType(Type type)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
Returns
IsNullable(Type)
Declaration
public static bool IsNullable(Type type)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
Returns
IsPrimitiveExtended(Type, bool, bool)
Declaration
public static bool IsPrimitiveExtended(Type type, bool includeNullables = true, bool includeEnums = false)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
| bool |
includeNullables |
|
| bool |
includeEnums |
|
Returns
StripNullable(Type)
Declaration
public static Type StripNullable(Type type)
Parameters
| Type |
Name |
Description |
| Type |
type |
|
Returns