Detailed Description

Represents an in-code using reference. e.g. using System.System.Text;

Public Member Functions

 CodeReference (string reference)
 Creates a new code reference with the given reference text. More...
 
Type GetType (string name)
 Attempts to get the type by name through this reference. More...
 

Static Public Member Functions

static Type GetFirstType (string name)
 Gets the first type found with the given name from the set of all assemblies. More...
 
static Assembly GetAssembly (string name)
 Gets an available assembly by name, if it's found. Null otherwise. More...
 
static void Setup ()
 Called on demand to setup the Assemblies array. More...
 
static void AddAssembly (Assembly assembly)
 Adds an assembly to the code assembly set. More...
 

Public Attributes

string Reference
 The reference text. More...
 
Assembly InAssembly
 The assembly this reference points to. More...
 

Static Public Attributes

static Assembly CurrentAssembly
 The assembly 'this' is defined in. More...
 
static Dictionary< string,
CodeAssembly
Assemblies
 All loaded assemblies More...
 

Constructor & Destructor Documentation

Nitro.CodeReference.CodeReference ( string  reference)
inline

Creates a new code reference with the given reference text.

Parameters
referenceThe reference text. Note that it must include the assembly name at the start. E.g. System.System.Text.

Member Function Documentation

static void Nitro.CodeReference.AddAssembly ( Assembly  assembly)
inlinestatic

Adds an assembly to the code assembly set.

static Assembly Nitro.CodeReference.GetAssembly ( string  name)
inlinestatic

Gets an available assembly by name, if it's found. Null otherwise.

Parameters
nameThe name of the assembly to find.
static Type Nitro.CodeReference.GetFirstType ( string  name)
inlinestatic

Gets the first type found with the given name from the set of all assemblies.

Parameters
nameThe type to look for.
Returns
The type, if it was found.
Type Nitro.CodeReference.GetType ( string  name)
inline

Attempts to get the type by name through this reference.

Parameters
nameThe name of the type to find.
Returns
The system type, if found. Null otherwise.
static void Nitro.CodeReference.Setup ( )
inlinestatic

Called on demand to setup the Assemblies array.

Member Data Documentation

Dictionary<string,CodeAssembly> Nitro.CodeReference.Assemblies
static

All loaded assemblies

Assembly Nitro.CodeReference.CurrentAssembly
static

The assembly 'this' is defined in.

Assembly Nitro.CodeReference.InAssembly

The assembly this reference points to.

string Nitro.CodeReference.Reference

The reference text.