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)

來源:
AssemblyCatalog.cs
來源:
AssemblyCatalog.cs
來源:
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)

來源:
AssemblyCatalog.cs
來源:
AssemblyCatalog.cs
來源:
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 (含) 以前版本的 Common Language Runtime,而且使用較新版本編譯 codeBase

呼叫端沒有路徑探索權限。

無法載入 codeBase

-或-

codeBase 指定了目錄。

codeBasenull

找不到 codeBase

codeBase 為零長度字串,只包含空格,或包含一或多個如 InvalidPathChars 所定義的無效字元。

指定的路徑、檔案名稱,或兩者都超出系統定義的長度上限。

備註

codeBase 參考的元件會載入載入內容中。

適用於

AssemblyCatalog(Assembly, ICompositionElement)

來源:
AssemblyCatalog.cs
來源:
AssemblyCatalog.cs
來源:
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)

來源:
AssemblyCatalog.cs
來源:
AssemblyCatalog.cs
來源:
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)

來源:
AssemblyCatalog.cs
來源:
AssemblyCatalog.cs
來源:
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)

來源:
AssemblyCatalog.cs
來源:
AssemblyCatalog.cs
來源:
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)

來源:
AssemblyCatalog.cs
來源:
AssemblyCatalog.cs
來源:
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)

來源:
AssemblyCatalog.cs
來源:
AssemblyCatalog.cs
來源:
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內容。

適用於