using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;
+using Internal.Runtime.CompilerServices;
namespace System.Runtime.Loader
{
dll = context.GetResolvedUnmanagedDll(assembly, unmanagedDllName);
}
- #region Copied from AssemblyLoadContext.CoreCLR.cs, modified until our AssemblyBuilder implementation is functional
private static RuntimeAssembly? GetRuntimeAssembly(Assembly? asm)
{
return
asm == null ? null :
asm is RuntimeAssembly rtAssembly ? rtAssembly :
- //asm is System.Reflection.Emit.AssemblyBuilder ab ? ab.InternalAssembly :
+ asm is System.Reflection.Emit.AssemblyBuilder ab ? Unsafe.As<RuntimeAssembly>(ab) : // Mono AssemblyBuilder is also a RuntimeAssembly, see AssemblyBuilder.Mono.cs
null;
}
- #endregion
}
}