Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
IsolatedComponentLoadContext.cs
Go to the documentation of this file.
1using System;
5
7
9{
11
12 [RequiresUnreferencedCode("The trimmer might remove assemblies that are loaded by this class", Url = "https://aka.ms/dotnet-illink/nativehost")]
13 public IsolatedComponentLoadContext(string componentAssemblyPath)
14 : base("IsolatedComponentLoadContext(" + componentAssemblyPath + ")")
15 {
16 _resolver = new AssemblyDependencyResolver(componentAssemblyPath);
17 }
18
19 [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "The trimmer warning is added to the constructor of this class since this method is a virtual one.")]
20 protected override Assembly Load(AssemblyName assemblyName)
21 {
22 string text = _resolver.ResolveAssemblyToPath(assemblyName);
23 if (text != null)
24 {
26 }
27 return null;
28 }
29
30 protected override IntPtr LoadUnmanagedDll(string unmanagedDllName)
31 {
32 string text = _resolver.ResolveUnmanagedDllToPath(unmanagedDllName);
33 if (text != null)
34 {
36 }
37 return IntPtr.Zero;
38 }
39}
Assembly LoadFromAssemblyPath(string assemblyPath)
IntPtr LoadUnmanagedDllFromPath(string unmanagedDllPath)
static readonly IntPtr Zero
Definition IntPtr.cs:18