AssemblyLoadContext 构造函数

定义

重载

AssemblyLoadContext()

初始化 AssemblyLoadContext 类的新实例。

AssemblyLoadContext(Boolean)

使用一个指示是否启用卸载的值来初始化 AssemblyLoadContext 类的新实例。

AssemblyLoadContext(String, Boolean)

使用名称和指示是否启用卸载的值来初始化 AssemblyLoadContext 类的新实例。

AssemblyLoadContext()

初始化 AssemblyLoadContext 类的新实例。

protected:
 AssemblyLoadContext();
protected AssemblyLoadContext ();
Protected Sub New ()

注解

此构造函数受到保护。 只能从 AssemblyLoadContext 类或其派生类调用它。

适用于

AssemblyLoadContext(Boolean)

使用一个指示是否启用卸载的值来初始化 AssemblyLoadContext 类的新实例。

protected:
 AssemblyLoadContext(bool isCollectible);
protected AssemblyLoadContext (bool isCollectible);
new System.Runtime.Loader.AssemblyLoadContext : bool -> System.Runtime.Loader.AssemblyLoadContext
Protected Sub New (isCollectible As Boolean)

参数

isCollectible
Boolean

要启用 Unload(),则为 true;否则为 false。 默认值为 false,因为启用卸载会产生性能成本。

注解

此构造函数受到保护。 只能从 AssemblyLoadContext 类或其派生类调用它。

适用于

AssemblyLoadContext(String, Boolean)

使用名称和指示是否启用卸载的值来初始化 AssemblyLoadContext 类的新实例。

public AssemblyLoadContext (string? name, bool isCollectible = false);
new System.Runtime.Loader.AssemblyLoadContext : string * bool -> System.Runtime.Loader.AssemblyLoadContext
Public Sub New (name As String, Optional isCollectible As Boolean = false)

参数

name
String

新实例中 Name 的值。 其值可为 null

isCollectible
Boolean

要启用 Unload(),则为 true;否则为 false。 默认值为 false,因为启用卸载会产生性能成本。

适用于