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

◆ ResolveSatelliteAssembly() [1/2]

Assembly System.Runtime.Loader.AssemblyLoadContext.ResolveSatelliteAssembly ( AssemblyName assemblyName)
inlineprivateinherited

Definition at line 717 of file AssemblyLoadContext.cs.

718 {
719 if (assemblyName.Name == null || !assemblyName.Name.EndsWith(".resources", StringComparison.Ordinal))
720 {
721 return null;
722 }
723 string assemblyName2 = assemblyName.Name.Substring(0, assemblyName.Name.Length - ".resources".Length);
726 string directoryName = Path.GetDirectoryName(assembly.Location);
727 if (directoryName == null)
728 {
729 return null;
730 }
731 string text = Path.Combine(directoryName, assemblyName.CultureName, assemblyName.Name + ".dll");
732 bool flag = FileSystem.FileExists(text);
733 if (flag || PathInternal.IsCaseSensitive)
734 {
735 }
736 Assembly result = (flag ? loadContext.LoadFromAssemblyPath(text) : null);
737 if (IsTracingEnabled())
738 {
739 TraceSatelliteSubdirectoryPathProbed(text, (!flag) ? (-2147024894) : 0);
740 }
741 return result;
742 }
static bool FileExists(string fullPath)
Definition FileSystem.cs:26
static bool IsCaseSensitive
static string Combine(string path1, string path2)
Definition Path.cs:304
static ? string GetDirectoryName(string? path)
Definition Path.cs:121
Assembly LoadFromAssemblyName(AssemblyName assemblyName)
static bool TraceSatelliteSubdirectoryPathProbed(string filePath, int hResult)
static ? AssemblyLoadContext GetLoadContext(Assembly assembly)

References System.IO.Path.Combine(), System.IO.FileSystem.FileExists(), System.IO.Path.GetDirectoryName(), System.Runtime.Loader.AssemblyLoadContext.GetLoadContext(), System.IO.PathInternal.IsCaseSensitive, System.Runtime.Loader.AssemblyLoadContext.IsTracingEnabled(), System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(), System.text, and System.Runtime.Loader.AssemblyLoadContext.TraceSatelliteSubdirectoryPathProbed().