public static FromPath ( |
||
codebase | /// The URI to the code base. /// | |
location | string | /// The location. Must be a valid path and an existing file if supplied--defaults to null. /// |
fullname | string | /// The full name of the assembly. Defaults to null. /// |
return | IAssemblyTarget |
/// <inheritdoc/> public IAssemblyTarget LoadAssembly(LoadMethod loadMethod, string assemblyPath, string pdbPath = null) { IAssemblyTarget target = null; var assembly = this.loader.LoadAssembly(loadMethod, assemblyPath, pdbPath); if (loadMethod == LoadMethod.LoadBits) { // Assemlies loaded by bits will have the codebase set to the assembly that loaded it. Set it to the correct path here. var codebaseUri = new Uri(assemblyPath); target = AssemblyTarget.FromPath(codebaseUri, assembly.Location, assembly.FullName); } else { target = AssemblyTarget.FromAssembly(assembly); } return(target); }