Click or drag to resize

LoadContextIntoDefault Class

LoadContextIntoDefault is an assembly load context intended for plugin assemblies with dependencies. The original plugin assembly is loaded into a newly created instance of this class (this can not be helped?), but at least all dependencies of the original plugin dependency are loaded into the same context, which is Instance. The default context can not be used, because then the resolution of 3rd level assemblies will fail. But in this way it can be avoided that we have unintentionally load multiple instances of the same assembly.
Inheritance Hierarchy
SystemObject
  System.Runtime.LoaderAssemblyLoadContext
    Altaxo.AddInItemsLoadContextIntoDefault

Namespace: Altaxo.AddInItems
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3448.0 (4.8.3448.0)
Syntax
C#
public class LoadContextIntoDefault : AssemblyLoadContext

The LoadContextIntoDefault type exposes the following members.

Constructors
 NameDescription
Public methodLoadContextIntoDefault Initializes a new instance of the LoadContextIntoDefault class.
Top
Properties
 NameDescription
Public propertyAssembliesReturns a collection of the Assembly instances loaded in the AssemblyLoadContext.
(Inherited from AssemblyLoadContext)
Public propertyIsCollectibleGets a value that indicates whether this AssemblyLoadContext is collectible.
(Inherited from AssemblyLoadContext)
Public propertyNameGet the name of the AssemblyLoadContext.
(Inherited from AssemblyLoadContext)
Top
Methods
 NameDescription
Public methodEnterContextualReflectionSets CurrentContextualReflectionContext to thisAssemblyLoadContext.
(Inherited from AssemblyLoadContext)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows the object to try to free resources and perform other cleanup operations before it's reclaimed by garbage collection.
(Inherited from AssemblyLoadContext)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodLoad Allows an assembly to be resolved and loaded based on its AssemblyName. Here, we first look into the current application domain, and if an assembly with the same name is already loaded, we return this assembly. Otherwise, we try to resolve the assembly name, and then load the assembly into the Default (!) context (and not in the context represented by this instance).
(Overrides AssemblyLoadContextLoad(AssemblyName))
Public methodLoadFromAssemblyNameResolves and loads an assembly given its AssemblyName.
(Inherited from AssemblyLoadContext)
Public methodLoadFromAssemblyPathLoads the contents of an assembly file on the specified path.
(Inherited from AssemblyLoadContext)
Public methodLoadFromNativeImagePathLoads the contents of the native image of a managed assembly file on the specified path.
(Inherited from AssemblyLoadContext)
Public methodLoadFromStream(Stream)Loads the assembly with a common object file format (COFF)-based image containing a managed assembly.
(Inherited from AssemblyLoadContext)
Public methodLoadFromStream(Stream, Stream)Loads the assembly with a common object file format (COFF)-based image containing a managed assembly, optionally including symbols for the assembly.
(Inherited from AssemblyLoadContext)
Protected methodLoadUnmanagedDll Load an unmanaged library by name.
(Overrides AssemblyLoadContextLoadUnmanagedDll(String))
Protected methodLoadUnmanagedDllFromPathLoads an unmanaged library from the specified path.
(Inherited from AssemblyLoadContext)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodSetProfileOptimizationRootSets the root path where the optimization profiles for this load context are stored.
(Inherited from AssemblyLoadContext)
Public methodStartProfileOptimizationStarts the profile optimization for the specified profile.
(Inherited from AssemblyLoadContext)
Public methodToStringReturns the string representation of this load context.
(Inherited from AssemblyLoadContext)
Public methodUnloadInitiates an unload of this AssemblyLoadContext.
(Inherited from AssemblyLoadContext)
Top
Events
 NameDescription
Public eventResolvingOccurs when the resolution of an assembly fails when attempting to load into this assembly load context.
(Inherited from AssemblyLoadContext)
Public eventResolvingUnmanagedDllOccurs when the resolution of a native library fails.
(Inherited from AssemblyLoadContext)
Public eventUnloadingOccurs when the AssemblyLoadContext is unloaded.
(Inherited from AssemblyLoadContext)
Top
See Also