ApplicationContext Class |
Namespace: Nova.CodeDOM
public class ApplicationContext
The ApplicationContext type exposes the following members.
Name | Description | |
---|---|---|
ApplicationContext |
Create an ApplicationContext.
|
Name | Description | |
---|---|---|
AppDomain |
The .NET AppDomain object associated with this ApplicationContext instance.
| |
ID |
The unique ID of the underlying AppDomain object.
|
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
ExpandEnvironmentMacros |
Expand all "$(name)" macros in the specified string by replacing with matching environment variables.
| |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
FindLoadedAssembly |
Find any already-loaded assembly with the specified name.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetMasterInstance |
Get the master ApplicationContext object.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Load | ||
LoadAssembly |
Load an assembly into the current AppDomain.
| |
LoadFrom | ||
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Unload |
Unload the ApplicationContext (unloads all loaded assemblies if not using reflection).
|
Name | Description | |
---|---|---|
_appDomain |
The .NET AppDomain object associated with this ApplicationContext instance.
| |
_assemblyToProjectMap |
Map of assemblies to projects in which they are referenced (used only when loading with reflection).
| |
_loadedAssembliesByAssembly |
Loaded assemblies indexed by assembly (used only when loading with reflection, to handle already-loaded assemblies).
| |
_loadedAssembliesByName |
Loaded assemblies indexed by display name, and also short name for the latest version.
| |
UseMonoCecilLoads |
Use Mono Cecil to load assemblies instead of reflection. Loaded data will use types in the Mono.Cecil
namespace such as AssemblyDefinition, TypeDefinition, MethodDefinition, PropertyDefinition, FieldDefinition,
etc. instead of the reflection types of Assembly, Type, MethodInfo, PropertyInfo, FieldInfo, etc. Using
Mono Cecil is faster than reflection, and gets around various possible issues, including the inability to
unload reflection data from memory.
| |
UseReflectionOnlyLoads |
Use reflection-only loads to load assemblies (ignored if using Mono Cecil loads).
Reflection-only loads bypass strong name verifications, CAS policy checks, processor architecture
loading rules, binding policies, don't execute any init code, and prevent automatic probing of dependencies.
This can help to load assemblies that otherwise wouldn't be loadable, but it can also cause loading problems
of its own, such as trying to load old framework assemblies (due to bypassing binding policies) that aren't
compatible with newer and/or 64bit OSes, or illegal cross-references with normally-loaded assemblies.
However, logic has been added to workaround these issues in most cases, and NOT using reflection-only loads
prevents loading old versions of framework assemblies, which can cause resolve conflicts (in either case,
old versions of 'mscorlib' can never be loaded into the default app domain).
|