<Member Name="SetProfileOptimizationRoot(System.String)" />
<Member Name="StartProfileOptimization(System.String)" />
<Member MemberType="Event" Name="AssemblyLoad" />
+ <Member MemberType="Event" Name="AssemblyResolve" />
<Member MemberType="Event" Name="Resolving" />
<Member MemberType="Event" Name="ResourceResolve" />
<Member MemberType="Event" Name="TypeResolve" />
public event System.Func<System.Runtime.Loader.AssemblyLoadContext, System.Reflection.AssemblyName, System.Reflection.Assembly> Resolving { add { } remove { } }
public event System.Action<System.Runtime.Loader.AssemblyLoadContext> Unloading { add { } remove { } }
public static event AssemblyLoadEventHandler AssemblyLoad { add { } remove { } }
+ public static event ResolveEventHandler AssemblyResolve { add { } remove { } }
public static event ResolveEventHandler TypeResolve { add { } remove { } }
public static event ResolveEventHandler ResourceResolve { add { } remove { } }
public static System.Reflection.AssemblyName GetAssemblyName(string assemblyPath) { throw null; }
#if FEATURE_CORECLR
if(rawAssembly == null)
throw new ArgumentNullException(nameof(rawAssembly));
- AssemblyLoadContext alc = new FileLoadAssemblyLoadContext();
+ AssemblyLoadContext alc = new IndividualAssemblyLoadContext();
MemoryStream assemblyStream = new MemoryStream(rawAssembly);
MemoryStream symbolStream = (rawSymbolStore!=null)?new MemoryStream(rawSymbolStore):null;
return alc.LoadFromStream(assemblyStream, symbolStream);
{
if(s_loadfile.TryGetValue(normalizedPath, out result))
return result;
- AssemblyLoadContext alc = new FileLoadAssemblyLoadContext();
+ AssemblyLoadContext alc = new IndividualAssemblyLoadContext();
result = alc.LoadFromAssemblyPath(normalizedPath);
s_loadfile.Add(normalizedPath, result);
}
add { AppDomain.CurrentDomain.ResourceResolve += value; }
remove { AppDomain.CurrentDomain.ResourceResolve -= value; }
}
+
+ // Occurs when resolution of assembly fails
+ // This event is fired after resolve events of AssemblyLoadContext fails
+ public static event ResolveEventHandler AssemblyResolve
+ {
+ add { AppDomain.CurrentDomain.AssemblyResolve += value; }
+ remove { AppDomain.CurrentDomain.AssemblyResolve -= value; }
+ }
}
[System.Security.SecuritySafeCritical]
}
[System.Security.SecuritySafeCritical]
- internal class FileLoadAssemblyLoadContext : AssemblyLoadContext
+ internal class IndividualAssemblyLoadContext : AssemblyLoadContext
{
- internal FileLoadAssemblyLoadContext() : base(false)
+ internal IndividualAssemblyLoadContext() : base(false)
{
}
{
if (pSpec->GetParentAssembly() != NULL)
{
+#ifndef FEATURE_CORECLR
if ( pSpec->IsIntrospectionOnly()
#ifdef FEATURE_FUSION
|| pSpec->GetParentLoadContext() == LOADCTX_TYPE_UNKNOWN
#endif
)
+#endif // FEATURE_CORECLR
{
gc.AssemblyRef=pSpec->GetParentAssembly()->GetExposedAssemblyObject();
}