Class TypeUtil
Inherited Members
Namespace: Innovt.Core.Utilities
Assembly: Innovt.Core.dll
Syntax
public static class TypeUtil
Methods
| Edit this page View SourceAddPrimitiveType(Type)
Adds a new type to the list of recognized primitive types.
Declaration
public static void AddPrimitiveType(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type to add. |
IsCollection(object)
Check if the object is a collection of T.
Declaration
public static bool IsCollection(object instance)
Parameters
Type | Name | Description |
---|---|---|
object | instance |
Returns
Type | Description |
---|---|
bool |
IsCollection(Type)
Checks if a given type is a collection (array or IEnumerable).
Declaration
public static bool IsCollection(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type to check. |
Returns
Type | Description |
---|---|
bool | True if the type is a collection; otherwise, false. |
IsCollection<T>(object)
Check if the object is a collection.
Declaration
public static bool IsCollection<T>(object instance)
Parameters
Type | Name | Description |
---|---|---|
object | instance |
Returns
Type | Description |
---|---|
bool |
Type Parameters
Name | Description |
---|---|
T |
IsDictionary(Type)
Checks if a given type is a dictionary.
Declaration
public static bool IsDictionary(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type to check. |
Returns
Type | Description |
---|---|
bool | True if the type is a dictionary; otherwise, false. |
IsNumericList(IList)
Returns true if the type is a numeric type.
Declaration
public static bool IsNumericList(IList list)
Parameters
Type | Name | Description |
---|---|---|
IList | list |
Returns
Type | Description |
---|---|
bool |
IsPrimitive(Type)
Checks if a given type is a primitive DynamoDB type.
Declaration
public static bool IsPrimitive(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type to check. |
Returns
Type | Description |
---|---|
bool | True if the type is primitive; otherwise, false. |