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

◆ AssemblyDependencyResolver()

System.Runtime.Loader.AssemblyDependencyResolver.AssemblyDependencyResolver ( string componentAssemblyPath)
inline

Definition at line 24 of file AssemblyDependencyResolver.cs.

25 {
26 if (componentAssemblyPath == null)
27 {
28 throw new ArgumentNullException("componentAssemblyPath");
29 }
30 string assemblyPathsList = null;
31 string nativeSearchPathsList = null;
32 string resourceSearchPathsList = null;
33 int num = 0;
35 try
36 {
37 Interop.HostPolicy.corehost_error_writer_fn corehost_error_writer_fn = delegate(string message)
38 {
39 errorMessage.AppendLine(message);
40 };
43 try
44 {
46 {
50 });
51 }
52 finally
53 {
55 GC.KeepAlive(corehost_error_writer_fn);
56 }
57 }
58 catch (EntryPointNotFoundException innerException)
59 {
60 throw new InvalidOperationException(SR.AssemblyDependencyResolver_FailedToLoadHostpolicy, innerException);
61 }
62 catch (DllNotFoundException innerException2)
63 {
64 throw new InvalidOperationException(SR.AssemblyDependencyResolver_FailedToLoadHostpolicy, innerException2);
65 }
66 if (num != 0)
67 {
68 throw new InvalidOperationException(SR.Format(SR.AssemblyDependencyResolver_FailedToResolveDependencies, componentAssemblyPath, num, errorMessage));
69 }
71 _assemblyPaths = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
72 string[] array2 = array;
73 foreach (string text in array2)
74 {
76 }
80 }
static int corehost_resolve_component_dependencies(string componentMainAssemblyPath, corehost_resolve_component_dependencies_result_fn result)
static IntPtr corehost_set_error_writer(IntPtr errorWriter)
bool TryAdd(TKey key, TValue value)
static ? string GetFileNameWithoutExtension(string? path)
Definition Path.cs:229
static ? string GetDirectoryName(string? path)
Definition Path.cs:121
static IntPtr GetFunctionPointerForDelegate(Delegate d)
Definition Marshal.cs:1457

References System.Runtime.Loader.AssemblyDependencyResolver._assemblyDirectorySearchPaths, System.Runtime.Loader.AssemblyDependencyResolver._assemblyPaths, System.Runtime.Loader.AssemblyDependencyResolver._nativeSearchPaths, System.Runtime.Loader.AssemblyDependencyResolver._resourceSearchPaths, System.array, System.SR.AssemblyDependencyResolver_FailedToLoadHostpolicy, System.SR.AssemblyDependencyResolver_FailedToResolveDependencies, Interop.HostPolicy.corehost_resolve_component_dependencies(), Interop.HostPolicy.corehost_set_error_writer(), System.SR.Format(), System.IO.Path.GetDirectoryName(), System.IO.Path.GetFileNameWithoutExtension(), System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(), System.GC.KeepAlive(), System.StringComparer.OrdinalIgnoreCase, System.Runtime.Loader.AssemblyDependencyResolver.SplitPathsList(), System.text, and System.Collections.Generic.Dictionary< TKey, TValue >.TryAdd().