/// <summary> /// Performs the actual loading of the assembly, updates data structures, and /// fires the <see cref="AssemblyLoad"/> event. /// </summary> private static Assembly LoadCore(string fullPath) { byte[] bytes = File.ReadAllBytes(fullPath); Assembly assembly = Assembly.Load(bytes); string assemblyName = assembly.FullName; s_assembliesFromFiles[fullPath] = assembly; s_filesFromAssemblyNames[assemblyName] = fullPath; s_assembliesFromNames[assemblyName] = assembly; AssemblyLoad?.Invoke(null, new AssemblyLoadEventArgs(fullPath, assembly)); return(assembly); }
// This method is called by the VM. private static void OnAssemblyLoad(RuntimeAssembly assembly) { AssemblyLoad?.Invoke(AppDomain.CurrentDomain, new AssemblyLoadEventArgs(assembly)); }
// This method is called by the VM. private static void OnAssemblyLoad(RuntimeAssembly assembly) { AssemblyLoad?.Invoke(null /* AppDomain */, new AssemblyLoadEventArgs(assembly)); }
// This method is called by the VM. private void OnAssemblyLoadEvent(RuntimeAssembly LoadedAssembly) { AssemblyLoad?.Invoke(this, new AssemblyLoadEventArgs(LoadedAssembly)); }