Class ObjectUtils
Utility class for object operations
Inherited Members
Namespace: Serenity.Shared.Utils
Assembly: Serenity.Shared.dll
Syntax
public static class ObjectUtils
Methods
GenerateGuid(string)
Generate a new GUID as a string
Declaration
public static string GenerateGuid(string format = "D")
Parameters
| Type | Name | Description |
|---|---|---|
| string | format |
Returns
| Type | Description |
|---|---|
| string | A new GUID in string format |
GetImplementingClasses<T>()
Get types of all classes that implement a specified interface
Declaration
public static Type[] GetImplementingClasses<T>()
Returns
| Type | Description |
|---|---|
| Type[] | An array of types of the implementing classes |
Type Parameters
| Name | Description |
|---|---|
| T | The interface type |
GetInheritedClasses<T>()
Get instances of all classes that inherit from a specified base class
Declaration
public static T[] GetInheritedClasses<T>()
Returns
| Type | Description |
|---|---|
| T[] | An array of instances of the inherited classes |
Type Parameters
| Name | Description |
|---|---|
| T | The base class type |
GetTypeFromCurrentDomainAssemblies(string)
Get a Type by name from the currently loaded assemblies in the AppDomain
Declaration
public static Type GetTypeFromCurrentDomainAssemblies(string typeName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | typeName | The full name of the type to find |
Returns
| Type | Description |
|---|---|
| Type | The Type if found; otherwise, null |