Share via


AssemblyCatalog 构造函数

定义

初始化 AssemblyCatalog 类的新实例。

重载

AssemblyCatalog(Assembly)

使用指定的程序集初始化 AssemblyCatalog 类的新实例。

AssemblyCatalog(String)

使用指定的基本代码初始化 AssemblyCatalog 类的新实例。

AssemblyCatalog(Assembly, ICompositionElement)

使用指定的程序集初始化 AssemblyCatalog 类的新实例。

AssemblyCatalog(Assembly, ReflectionContext)

用指定的程序集和反射上下文信息初始化 AssemblyCatalog 类的新实例。

AssemblyCatalog(String, ICompositionElement)

使用指定的基本代码初始化 AssemblyCatalog 类的新实例。

AssemblyCatalog(String, ReflectionContext)

用指定的基本代码和反射上下文初始化 AssemblyCatalog 类的新实例。

AssemblyCatalog(Assembly, ReflectionContext, ICompositionElement)

用指定的程序集和反射上下文信息初始化 AssemblyCatalog 类的新实例。

AssemblyCatalog(String, ReflectionContext, ICompositionElement)

用指定的基本代码和反射上下文初始化 AssemblyCatalog 类的新实例。

AssemblyCatalog(Assembly)

Source:
AssemblyCatalog.cs
Source:
AssemblyCatalog.cs
Source:
AssemblyCatalog.cs

使用指定的程序集初始化 AssemblyCatalog 类的新实例。

public:
 AssemblyCatalog(System::Reflection::Assembly ^ assembly);
public AssemblyCatalog (System.Reflection.Assembly assembly);
new System.ComponentModel.Composition.Hosting.AssemblyCatalog : System.Reflection.Assembly -> System.ComponentModel.Composition.Hosting.AssemblyCatalog
Public Sub New (assembly As Assembly)

参数

assembly
Assembly

包含要添加到 Type 对象中的特性化 AssemblyCatalog 对象的程序集。

例外

assemblynull

- 或 -

assembly 是在只反射上下文中加载的。

适用于

AssemblyCatalog(String)

Source:
AssemblyCatalog.cs
Source:
AssemblyCatalog.cs
Source:
AssemblyCatalog.cs

使用指定的基本代码初始化 AssemblyCatalog 类的新实例。

public:
 AssemblyCatalog(System::String ^ codeBase);
public AssemblyCatalog (string codeBase);
new System.ComponentModel.Composition.Hosting.AssemblyCatalog : string -> System.ComponentModel.Composition.Hosting.AssemblyCatalog
Public Sub New (codeBase As String)

参数

codeBase
String

一个字符串,该字符串指定程序集的基本代码(即程序集文件的路径),该程序集包含要添加到 AssemblyCatalog 对象的特性化 Type 对象。

例外

codeBase 不是有效的程序集。

- 或 -

当前加载的是 2.0 或更低版本的公共语言运行时,而 codeBase 是用更高版本的公共语言运行时编译的。

调用方没有路径发现权限。

未能加载 codeBase

- 或 -

codeBase 指定了一个目录。

codeBasenull

codeBase 未找到。

codeBase 是一个长度为零的字符串,仅包含空格,或包含一个或多个由 InvalidPathChars 定义的无效字符。

指定的路径和/或文件名超过了系统定义的最大长度。

注解

引用的 codeBase 程序集将加载到加载上下文中。

适用于

AssemblyCatalog(Assembly, ICompositionElement)

Source:
AssemblyCatalog.cs
Source:
AssemblyCatalog.cs
Source:
AssemblyCatalog.cs

使用指定的程序集初始化 AssemblyCatalog 类的新实例。

public:
 AssemblyCatalog(System::Reflection::Assembly ^ assembly, System::ComponentModel::Composition::Primitives::ICompositionElement ^ definitionOrigin);
public AssemblyCatalog (System.Reflection.Assembly assembly, System.ComponentModel.Composition.Primitives.ICompositionElement definitionOrigin);
new System.ComponentModel.Composition.Hosting.AssemblyCatalog : System.Reflection.Assembly * System.ComponentModel.Composition.Primitives.ICompositionElement -> System.ComponentModel.Composition.Hosting.AssemblyCatalog
Public Sub New (assembly As Assembly, definitionOrigin As ICompositionElement)

参数

assembly
Assembly

包含要添加到 Type 对象中的特性化 AssemblyCatalog 对象的程序集。

definitionOrigin
ICompositionElement

诊断用于标识部件的源的元素。

例外

assemblydefinitionOriginnull

- 或 -

assembly 是在只反射上下文中加载的。

适用于

AssemblyCatalog(Assembly, ReflectionContext)

Source:
AssemblyCatalog.cs
Source:
AssemblyCatalog.cs
Source:
AssemblyCatalog.cs

用指定的程序集和反射上下文信息初始化 AssemblyCatalog 类的新实例。

public:
 AssemblyCatalog(System::Reflection::Assembly ^ assembly, System::Reflection::ReflectionContext ^ reflectionContext);
public AssemblyCatalog (System.Reflection.Assembly assembly, System.Reflection.ReflectionContext reflectionContext);
new System.ComponentModel.Composition.Hosting.AssemblyCatalog : System.Reflection.Assembly * System.Reflection.ReflectionContext -> System.ComponentModel.Composition.Hosting.AssemblyCatalog
Public Sub New (assembly As Assembly, reflectionContext As ReflectionContext)

参数

assembly
Assembly

包含要添加到 Type 对象中的特性化 AssemblyCatalog 对象的程序集。

reflectionContext
ReflectionContext

目录用于解释类型的上下文。

例外

assemblyreflectionContextnull

- 或 -

assembly 是在只反射上下文中加载的。

适用于

AssemblyCatalog(String, ICompositionElement)

Source:
AssemblyCatalog.cs
Source:
AssemblyCatalog.cs
Source:
AssemblyCatalog.cs

使用指定的基本代码初始化 AssemblyCatalog 类的新实例。

public:
 AssemblyCatalog(System::String ^ codeBase, System::ComponentModel::Composition::Primitives::ICompositionElement ^ definitionOrigin);
public AssemblyCatalog (string codeBase, System.ComponentModel.Composition.Primitives.ICompositionElement definitionOrigin);
new System.ComponentModel.Composition.Hosting.AssemblyCatalog : string * System.ComponentModel.Composition.Primitives.ICompositionElement -> System.ComponentModel.Composition.Hosting.AssemblyCatalog
Public Sub New (codeBase As String, definitionOrigin As ICompositionElement)

参数

codeBase
String

一个字符串,该字符串指定程序集的基本代码(即程序集文件的路径),该程序集包含要添加到 AssemblyCatalog 对象的特性化 Type 对象。

definitionOrigin
ICompositionElement

诊断用于标识部件的源的元素。

例外

codeBase 不是有效的程序集。

- 或 -

当前加载的是公共语言运行时 2.0 版或更高版本,而 codeBase 是用更高的版本编译的。

调用方没有路径发现权限。

未能加载 codeBase

- 或 -

codeBase 指定了一个目录。

codebasedefinitionOriginnull

codeBase 未找到。

codeBase 是一个长度为零的字符串,仅包含空格,或包含一个或多个由 InvalidPathChars 定义的无效字符。

指定的路径和/或文件名超过了系统定义的最大长度。

注解

引用的 codeBase 程序集将加载到 Load 上下文中。

适用于

AssemblyCatalog(String, ReflectionContext)

Source:
AssemblyCatalog.cs
Source:
AssemblyCatalog.cs
Source:
AssemblyCatalog.cs

用指定的基本代码和反射上下文初始化 AssemblyCatalog 类的新实例。

public:
 AssemblyCatalog(System::String ^ codeBase, System::Reflection::ReflectionContext ^ reflectionContext);
public AssemblyCatalog (string codeBase, System.Reflection.ReflectionContext reflectionContext);
new System.ComponentModel.Composition.Hosting.AssemblyCatalog : string * System.Reflection.ReflectionContext -> System.ComponentModel.Composition.Hosting.AssemblyCatalog
Public Sub New (codeBase As String, reflectionContext As ReflectionContext)

参数

codeBase
String

一个字符串,该字符串指定程序集的基本代码(即程序集文件的路径),该程序集包含要添加到 AssemblyCatalog 对象的特性化 Type 对象。

reflectionContext
ReflectionContext

目录用于解释类型的上下文。

例外

codeBase 不是有效的程序集。

- 或 -

当前加载的是公共语言运行时 2.0 版或更高版本,而 codeBase 是用更高的版本编译的。

调用方没有路径发现权限。

未能加载 codeBase

- 或 -

codeBase 指定了一个目录。

codebasereflectionContextnull

codeBase 未找到。

codeBase 是一个长度为零的字符串,仅包含空格,或包含一个或多个由 InvalidPathChars 定义的无效字符。

指定的路径和/或文件名超过了系统定义的最大长度。

注解

引用的codebase 程序集将加载到 Load 上下文中。

适用于

AssemblyCatalog(Assembly, ReflectionContext, ICompositionElement)

Source:
AssemblyCatalog.cs
Source:
AssemblyCatalog.cs
Source:
AssemblyCatalog.cs

用指定的程序集和反射上下文信息初始化 AssemblyCatalog 类的新实例。

public:
 AssemblyCatalog(System::Reflection::Assembly ^ assembly, System::Reflection::ReflectionContext ^ reflectionContext, System::ComponentModel::Composition::Primitives::ICompositionElement ^ definitionOrigin);
public AssemblyCatalog (System.Reflection.Assembly assembly, System.Reflection.ReflectionContext reflectionContext, System.ComponentModel.Composition.Primitives.ICompositionElement definitionOrigin);
new System.ComponentModel.Composition.Hosting.AssemblyCatalog : System.Reflection.Assembly * System.Reflection.ReflectionContext * System.ComponentModel.Composition.Primitives.ICompositionElement -> System.ComponentModel.Composition.Hosting.AssemblyCatalog
Public Sub New (assembly As Assembly, reflectionContext As ReflectionContext, definitionOrigin As ICompositionElement)

参数

assembly
Assembly

包含要添加到 Type 对象中的特性化 AssemblyCatalog 对象的程序集。

reflectionContext
ReflectionContext

目录用于解释类型的上下文。

definitionOrigin
ICompositionElement

诊断用于标识部件的源的元素。

例外

assemblydefinitionOriginreflectionContextnull

- 或 -

assembly 是在只反射上下文中加载的。

适用于

AssemblyCatalog(String, ReflectionContext, ICompositionElement)

Source:
AssemblyCatalog.cs
Source:
AssemblyCatalog.cs
Source:
AssemblyCatalog.cs

用指定的基本代码和反射上下文初始化 AssemblyCatalog 类的新实例。

public:
 AssemblyCatalog(System::String ^ codeBase, System::Reflection::ReflectionContext ^ reflectionContext, System::ComponentModel::Composition::Primitives::ICompositionElement ^ definitionOrigin);
public AssemblyCatalog (string codeBase, System.Reflection.ReflectionContext reflectionContext, System.ComponentModel.Composition.Primitives.ICompositionElement definitionOrigin);
new System.ComponentModel.Composition.Hosting.AssemblyCatalog : string * System.Reflection.ReflectionContext * System.ComponentModel.Composition.Primitives.ICompositionElement -> System.ComponentModel.Composition.Hosting.AssemblyCatalog
Public Sub New (codeBase As String, reflectionContext As ReflectionContext, definitionOrigin As ICompositionElement)

参数

codeBase
String

一个字符串,该字符串指定程序集的基本代码(即程序集文件的路径),该程序集包含要添加到 AssemblyCatalog 对象的特性化 Type 对象。

reflectionContext
ReflectionContext

目录用于解释类型的上下文。

definitionOrigin
ICompositionElement

诊断用于标识部件的源的元素。

例外

codeBase 不是有效的程序集。

- 或 -

当前加载的是公共语言运行时 2.0 版或更高版本,而 codeBase 是用更高的版本编译的。

调用方没有路径发现权限。

未能加载 codeBase

- 或 -

codeBase 指定了一个目录。

codebasedefinitionOriginreflectionContextnull

codeBase 未找到。

codeBase 是一个长度为零的字符串,仅包含空格,或包含一个或多个由 InvalidPathChars 定义的无效字符。

指定的路径和/或文件名超过了系统定义的最大长度。

注解

引用的 codebase 程序集将加载到 Load 上下文中。

适用于