AssemblyLoadContextTracker
Provides tracking functionality for AssemblyLoadContext instances when loading assemblies dynamically. Implements ICompilerContext and manages unloading of previous contexts when loading a new assembly.
Hereda de: Disposable
Implementa: ICompilerContext, IDisposable
Constructores
public AssemblyLoadContextTracker(Action<Exception> uploadingError)
assemblyLoadContextTracker = AssemblyLoadContextTracker(uploadingError)
Provides tracking functionality for AssemblyLoadContext instances when loading assemblies dynamically. Implements ICompilerContext and manages unloading of previous contexts when loading a new assembly.
Métodos
protected override void DisposeManaged()
assemblyLoadContextTracker.DisposeManaged()
Disposes the managed resources. Override this method to add custom clean up of managed resources.
public Assembly LoadFromBinary(byte[] assembly)
result = assemblyLoadContextTracker.LoadFromBinary(assembly)
Loads an assembly from the provided binary data. If a different assembly is passed than the one previously loaded, the previous context is unloaded.
- assembly
- The binary representation of the assembly to load.
Devuelve: The loaded Assembly instance.
public void Unload()
assemblyLoadContextTracker.Unload()
Unloads the current AssemblyLoadContext and resets the internal state.