Method |
Description |
|
GetAssemblies ( ) : System.Reflection.Assembly[] |
Just a simple call to AppDomain.CurrentDomain.GetAssemblies(), nothing more. |
|
LoadAssembly ( LoadMethod loadMethod, string assemblyPath, string pdbPath = null ) : Assembly |
If the LoadMethod for this instance is set to LoadBits and the path to the PDB file is unspecified then we will attempt to guess the path to the PDB and load it. Note that if an assembly is loaded into memory without it's debugging symbols then an image exception will be thrown. Be wary of this. Loading an Assembly with the LoadBits method will not lock the DLL file because the entire assembly is loaded into memory and the file handle is closed. Note that, however, Assemblies loaded in this manner will not have a location associated with them--so you must then key the Assembly by it's strong name. This can cause problems when loading multiple versions of the same assembly into a single application domain. |
|
LoadAssemblyWithReferences ( LoadMethod loadMethod, string assemblyPath ) : IList |
This implementation will perform a best-effort load of the target assembly and it's required references into the current application domain. The .NET framework pins us in on which call we're allowed to use when loading these assemblies, so we'll need to rely on the AssemblyResolver instance attached to the AppDomain in order to load the way we want. |
|