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

◆ LoadFile()

static Assembly System.Reflection.Assembly.LoadFile ( string path)
inlinestaticinherited

Definition at line 518 of file Assembly.cs.

519 {
520 if (path == null)
521 {
522 throw new ArgumentNullException("path");
523 }
525 {
526 throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, path), "path");
527 }
528 string fullPath = Path.GetFullPath(path);
530 {
531 if (s_loadfile.TryGetValue(fullPath, out var value))
532 {
533 return value;
534 }
536 value = assemblyLoadContext.LoadFromAssemblyPath(fullPath);
538 return value;
539 }
540 }
static bool IsPartiallyQualified(ReadOnlySpan< char > path)
static string GetFullPath(string path)
Definition Path.cs:881
static readonly Dictionary< string, Assembly > s_loadfile
Definition Assembly.cs:17

References System.SR.Argument_AbsolutePathRequired, System.Runtime.Serialization.Dictionary, System.SR.Format(), System.IO.Path.GetFullPath(), System.IO.PathInternal.IsPartiallyQualified(), System.Reflection.Assembly.s_loadfile, and System.value.

Referenced by System.AppDomain.ExecuteAssembly(), and System.Xml.Serialization.TempAssembly.LoadAssemblyByPath().