public MyAssemblyResolver(LoadedAssembly parent, bool loadOnDemand) { this.parent = parent; this.loadOnDemand = loadOnDemand; this.providedAssemblyResolver = parent.providedAssemblyResolver; this.assemblyList = parent.assemblyList; // Note: we cache a copy of the assembly list in the constructor, so that the // resolve calls only search-by-asm-name in the assemblies that were already loaded // at the time of the GetResolver() call. this.alreadyLoadedAssemblies = assemblyList.GetAssemblies(); // If we didn't do this, we'd also search in the assemblies that we just started to load // in previous Resolve() calls; but we don't want to wait for those to be loaded. this.tfmTask = parent.GetTargetFrameworkIdAsync(); this.referenceLoadInfo = parent.LoadedAssemblyReferencesInfo; }