Table of Contents

Class AssemblyLoadContextExtensions

Namespace
Ecng.Compilation
Assembly
Ecng.Compilation.dll

Provides extension methods for AssemblyLoadContext related to compilation operations.

public static class AssemblyLoadContextExtensions
Inheritance
AssemblyLoadContextExtensions
Inherited Members

Methods

LoadFromBinary(AssemblyLoadContext, byte[])

Loads an assembly from the provided binary data using a memory stream.

public static Assembly LoadFromBinary(this AssemblyLoadContext visitor, byte[] assembly)

Parameters

visitor AssemblyLoadContext

The AssemblyLoadContext instance to load the assembly.

assembly byte[]

The byte array containing the assembly binary.

Returns

Assembly

The loaded Assembly.

ToContext(AssemblyLoadContext)

Wraps the specified AssemblyLoadContext into an ICompilerContext so that the context can be used for loading assemblies.

public static ICompilerContext ToContext(this AssemblyLoadContext context)

Parameters

context AssemblyLoadContext

The AssemblyLoadContext instance to wrap.

Returns

ICompilerContext

An ICompilerContext that uses the specified AssemblyLoadContext.