Infohazard.Core 1.4.2
Infohazard Core Utility Library
Loading...
Searching...
No Matches
Infohazard.Core.TypeUtility Class Reference

Contains utilities for working with C# reflection types and getting a type by its name. More...

Static Public Member Functions

static Type GetType (string fullName)
 Get a type given its full name (including namespace). More...
 
static string GetDisplayName (this Type type, bool includeNamespace=false, bool capitalizeFirst=false)
 Get a human-readable name of a type (mostly used for generic types). Generally equivalent to the name you use in C# code. More...
 

Properties

static Assembly[] AllAssemblies [get]
 Returns an array of all loaded assemblies. More...
 
static IEnumerable< Type > AllTypes [get]
 Returns an enumeration of all loaded types. More...
 

Detailed Description

Contains utilities for working with C# reflection types and getting a type by its name.

Member Function Documentation

◆ GetDisplayName()

static string Infohazard.Core.TypeUtility.GetDisplayName ( this Type  type,
bool  includeNamespace = false,
bool  capitalizeFirst = false 
)
static

Get a human-readable name of a type (mostly used for generic types). Generally equivalent to the name you use in C# code.

Parameters
typeThe type.
includeNamespaceWhether to include namespaces in the result.
capitalizeFirstIf true, force the first character to a capital.
Returns
A human-readable name of the type.

◆ GetType()

static Type Infohazard.Core.TypeUtility.GetType ( string  fullName)
static

Get a type given its full name (including namespace).

Parameters
fullNameName of the type including namespace.
Returns
The found type, or null.

Property Documentation

◆ AllAssemblies

Assembly [] Infohazard.Core.TypeUtility.AllAssemblies
staticget

Returns an array of all loaded assemblies.

◆ AllTypes

IEnumerable<Type> Infohazard.Core.TypeUtility.AllTypes
staticget

Returns an enumeration of all loaded types.


The documentation for this class was generated from the following file: