AssemblyLoadContextExtensions
Ecng.Compilation
Provides extension methods for AssemblyLoadContext related to compilation operations.
Methoden
LoadFromBinary
public static Assembly LoadFromBinary(AssemblyLoadContext visitor, byte[] assembly)
result = AssemblyLoadContextExtensions.LoadFromBinary(visitor, assembly)
Loads an assembly from the provided binary data using a memory stream.
- visitor
- The AssemblyLoadContext instance to load the assembly.
- assembly
- The byte array containing the assembly binary.
Rückgabe: The loaded Assembly.
ToContext
public static ICompilerContext ToContext(AssemblyLoadContext context)
result = AssemblyLoadContextExtensions.ToContext(context)
Wraps the specified AssemblyLoadContext into an ICompilerContext so that the context can be used for loading assemblies.
- context
- The AssemblyLoadContext instance to wrap.
Rückgabe: An ICompilerContext that uses the specified AssemblyLoadContext.