Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ LoadInMemoryAssembly()

static void Internal.Runtime.InteropServices.InMemoryAssemblyLoader.LoadInMemoryAssembly ( IntPtr moduleHandle,
IntPtr assemblyPath )
inlinestatic

Definition at line 21 of file InMemoryAssemblyLoader.cs.

22 {
23 if (!IsSupported)
24 {
25 throw new NotSupportedException("This API is not enabled in trimmed scenarios. see https://aka.ms/dotnet-illink/nativehost for more details");
26 }
27 string text = Marshal.PtrToStringUni(assemblyPath);
28 if (text == null)
29 {
30 throw new ArgumentOutOfRangeException("assemblyPath");
31 }
32 AssemblyLoadContext assemblyLoadContext = new IsolatedComponentLoadContext(text);
33 assemblyLoadContext.LoadFromInMemoryModule(moduleHandle);
34 }
static unsafe? string PtrToStringUni(IntPtr ptr)
Definition Marshal.cs:652
Assembly LoadFromInMemoryModule(IntPtr moduleHandle)

References Internal.Runtime.InteropServices.InMemoryAssemblyLoader.IsSupported, System.Runtime.Loader.AssemblyLoadContext.LoadFromInMemoryModule(), System.Runtime.InteropServices.Marshal.PtrToStringUni(), and System.text.