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

◆ LoadFromStream() [3/3]

Assembly System.Runtime.Loader.AssemblyLoadContext.LoadFromStream ( Stream assembly,
Stream? assemblySymbols )
inlineinherited

Definition at line 483 of file AssemblyLoadContext.cs.

484 {
485 if (assembly == null)
486 {
487 throw new ArgumentNullException("assembly");
488 }
489 int num = (int)assembly.Length;
490 if (num <= 0)
491 {
492 throw new BadImageFormatException(SR.BadImageFormat_BadILFormat);
493 }
494 byte[] array = new byte[num];
495 assembly.Read(array, 0, num);
496 byte[] array2 = null;
497 if (assemblySymbols != null)
498 {
499 int num2 = (int)assemblySymbols.Length;
500 array2 = new byte[num2];
501 assemblySymbols.Read(array2, 0, num2);
502 }
504 {
506 return InternalLoad(array, array2);
507 }
508 }
unsafe Assembly InternalLoad(ReadOnlySpan< byte > arrAssembly, ReadOnlySpan< byte > arrSymbols)

References System.Runtime.Loader.AssemblyLoadContext._unloadLock, System.array, System.SR.BadImageFormat_BadILFormat, System.Runtime.Loader.AssemblyLoadContext.InternalLoad(), and System.Runtime.Loader.AssemblyLoadContext.VerifyIsAlive().