AssemblyLoadContextTracker
Provides tracking functionality for AssemblyLoadContext instances when loading assemblies dynamically. Implements ICompilerContext and manages unloading of previous contexts when loading a new assembly.
継承元: Disposable
実装: ICompilerContext, IDisposable
コンストラクター
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.
メソッド
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.
戻り値: The loaded Assembly instance.
public void Unload()
assemblyLoadContextTracker.Unload()
Unloads the current AssemblyLoadContext and resets the internal state.