AssemblyLoadContext AssemblyLoadContext AssemblyLoadContext AssemblyLoadContext Constructors

定义

重载

AssemblyLoadContext() AssemblyLoadContext() AssemblyLoadContext()

初始化 AssemblyLoadContext 类的新实例。Initializes a new instance of the AssemblyLoadContext class.

AssemblyLoadContext(Boolean) AssemblyLoadContext(Boolean) AssemblyLoadContext(Boolean) AssemblyLoadContext(Boolean)

使用一个指示是否启用卸载的值来初始化 AssemblyLoadContext 类的新实例。Initializes a new instance of the AssemblyLoadContext class with a value that indicates whether unloading is enabled.

AssemblyLoadContext(String, Boolean) AssemblyLoadContext(String, Boolean) AssemblyLoadContext(String, Boolean)

使用名称和指示是否启用卸载的值来初始化 AssemblyLoadContext 类的新实例。Initializes a new instance of the AssemblyLoadContext class with a name and a value that indicates whether unloading is enabled.

AssemblyLoadContext() AssemblyLoadContext() AssemblyLoadContext()

初始化 AssemblyLoadContext 类的新实例。Initializes a new instance of the AssemblyLoadContext class.

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

注解

此构造函数受到保护。This constructor is protected. 仅从调用AssemblyLoadContext类或其派生的类。It can only be called from the AssemblyLoadContext class or its derived classes.

AssemblyLoadContext(Boolean) AssemblyLoadContext(Boolean) AssemblyLoadContext(Boolean) AssemblyLoadContext(Boolean)

使用一个指示是否启用卸载的值来初始化 AssemblyLoadContext 类的新实例。Initializes a new instance of the AssemblyLoadContext class with a value that indicates whether unloading is enabled.

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 Boolean Boolean Boolean

要启用 Unload(),则为 true;否则为 falsetrue to enable Unload(); otherwise, false. 默认值为 false,因为启用卸载会产生性能成本。The default value is false because there is a performance cost associated with enabling unloading.

注解

此构造函数受到保护。This constructor is protected. 仅从调用AssemblyLoadContext类或其派生的类。It can only be called from the AssemblyLoadContext class or its derived classes.

AssemblyLoadContext(String, Boolean) AssemblyLoadContext(String, Boolean) AssemblyLoadContext(String, Boolean)

使用名称和指示是否启用卸载的值来初始化 AssemblyLoadContext 类的新实例。Initializes a new instance of the AssemblyLoadContext class with a name and a value that indicates whether unloading is enabled.

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 String String String

新实例中 Name 的值。The value for Name in the new instance. 其值可为 nullIts value can be null.

isCollectible
Boolean Boolean Boolean Boolean

要启用 Unload(),则为 true;否则为 falsetrue to enable Unload(); otherwise, false. 默认值为 false,因为启用卸载会产生性能成本。The default value is false because there is a performance cost associated with enabling unloading.

适用于