예제 #1
0
        // This method is invoked by the VM to resolve a satellite assembly reference
        // after trying assembly resolution via Load override without success.
        private static Assembly?ResolveSatelliteAssembly(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
        {
            AssemblyLoadContext context = (AssemblyLoadContext)(GCHandle.FromIntPtr(gchManagedAssemblyLoadContext).Target) !;

            // Invoke the ResolveSatelliteAssembly method
            return(context.ResolveSatelliteAssembly(assemblyName));
        }
예제 #2
0
        // Invoked by Mono to resolve requests to load satellite assemblies.
        private static Assembly?MonoResolveUsingResolveSatelliteAssembly(IntPtr gchALC, string assemblyName)
        {
            AssemblyLoadContext context = GetAssemblyLoadContext(gchALC);

            return(context.ResolveSatelliteAssembly(new AssemblyName(assemblyName)));
        }