@@ -189,6 +189,7 @@ protected override Assembly Load(AssemblyName assemblyName)
189189 if ( useResolvingHandlerOnly )
190190 throw new NotSupportedException ( UseResolvingEventHandlerOnly ) ;
191191
192+ System . Console . WriteLine ( "== LC1 == Requesting: {0}" , assemblyName . FullName ) ;
192193 return Resolve ( this , assemblyName ) ;
193194 }
194195
@@ -246,6 +247,7 @@ private Assembly Resolve(AssemblyLoadContext loadContext, AssemblyName assemblyN
246247 // In this case, return null so that other Resolving event handlers can kick in to resolve the request.
247248 if ( ! isAssemblyFileFound || ! isAssemblyFileMatching )
248249 {
250+ System . Console . WriteLine ( " -- Return null" ) ;
249251 return null ;
250252 }
251253
@@ -256,6 +258,7 @@ private Assembly Resolve(AssemblyLoadContext loadContext, AssemblyName assemblyN
256258 {
257259 // Add the loaded assembly to the cache
258260 AssemblyCache . TryAdd ( assemblyName . Name , asmLoaded ) ;
261+ System . Console . WriteLine ( " ++ Load succeed: {0}" , asmLoaded . FullName ) ;
259262 }
260263 }
261264
@@ -270,6 +273,7 @@ private Assembly Resolve(AssemblyLoadContext loadContext, AssemblyName assemblyN
270273 internal Assembly LoadFrom ( string assemblyPath )
271274 {
272275 ValidateAssemblyPath ( assemblyPath , "assemblyPath" ) ;
276+ System . Console . WriteLine ( "*** LC1 *** LoadFrom {0}" , assemblyPath ) ;
273277
274278 Assembly asmLoaded ;
275279 AssemblyName assemblyName = GetAssemblyName ( assemblyPath ) ;
@@ -300,6 +304,7 @@ internal Assembly LoadFrom(string assemblyPath)
300304 {
301305 probingPaths . Add ( parentPath ) ;
302306 }
307+ System . Console . WriteLine ( " ++ LoadFrom succeed: {0}" , asmLoaded . FullName ) ;
303308 }
304309 }
305310
@@ -436,10 +441,28 @@ internal IEnumerable<string> GetAvailableDotNetTypes()
436441 return coreClrTypeCatalog . Keys ;
437442 }
438443
444+ /// <summary>
445+ /// Set the profile optimization root on the approprite load context
446+ /// </summary>
447+ internal void SetProfileOptimizationRootImpl ( string directoryPath )
448+ {
449+ if ( this . useResolvingHandlerOnly )
450+ activeLoadContext . SetProfileOptimizationRoot ( directoryPath ) ;
451+ }
452+
453+ /// <summary>
454+ /// Start the profile optimization on the approprite load context
455+ /// </summary>
456+ internal void StartProfileOptimizationImpl ( string profile )
457+ {
458+ if ( this . useResolvingHandlerOnly )
459+ activeLoadContext . StartProfileOptimization ( profile ) ;
460+ }
461+
439462 #endregion Protected_Internal_Methods
440-
463+
441464 #region Private_Methods
442-
465+
443466 /// <summary>
444467 /// Handle the AssemblyLoad event
445468 /// </summary>
0 commit comments