Editar

Partilhar via


AssemblyCatalog Constructors

Definition

Initializes a new instance of the AssemblyCatalog class.

Overloads

AssemblyCatalog(Assembly)

Initializes a new instance of the AssemblyCatalog class with the specified assembly.

AssemblyCatalog(String)

Initializes a new instance of the AssemblyCatalog class with the specified code base.

AssemblyCatalog(Assembly, ICompositionElement)

Initializes a new instance of the AssemblyCatalog class with the specified assembly.

AssemblyCatalog(Assembly, ReflectionContext)

Initializes a new instance of the AssemblyCatalog class with the specified assembly and reflection context.

AssemblyCatalog(String, ICompositionElement)

Initializes a new instance of the AssemblyCatalog class with the specified code base.

AssemblyCatalog(String, ReflectionContext)

Initializes a new instance of the AssemblyCatalog class with the specified code base and reflection context.

AssemblyCatalog(Assembly, ReflectionContext, ICompositionElement)

Initializes a new instance of the AssemblyCatalog class with the specified assembly and reflection context.

AssemblyCatalog(String, ReflectionContext, ICompositionElement)

Initializes a new instance of the AssemblyCatalog class with the specified code base and reflection context.

AssemblyCatalog(Assembly)

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

Initializes a new instance of the AssemblyCatalog class with the specified assembly.

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)

Parameters

assembly
Assembly

The assembly that contains the attributed Type objects to add to the AssemblyCatalog object.

Exceptions

assembly is null.

-or-

assembly was loaded in the reflection-only context.

Applies to

AssemblyCatalog(String)

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

Initializes a new instance of the AssemblyCatalog class with the specified code base.

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)

Parameters

codeBase
String

A string that specifies the code base of the assembly (that is, the path to the assembly file) that contains the attributed Type objects to add to the AssemblyCatalog object.

Exceptions

codeBase is not a valid assembly.

-or-

Version 2.0 or earlier of the common language runtime is currently loaded and codeBase was compiled with a later version.

The caller does not have path discovery permission.

codeBase could not be loaded.

-or-

codeBase specified a directory.

codeBase is null.

codeBase is not found.

codeBase is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.

The specified path, file name, or both exceed the system-defined maximum length.

Remarks

The assembly referenced by codeBase is loaded into the load context.

Applies to

AssemblyCatalog(Assembly, ICompositionElement)

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

Initializes a new instance of the AssemblyCatalog class with the specified assembly.

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)

Parameters

assembly
Assembly

The assembly that contains the attributed Type objects to add to the AssemblyCatalog object.

definitionOrigin
ICompositionElement

The element used by diagnostics to identify the sources of parts.

Exceptions

assembly or definitionOrigin is null.

-or-

assembly was loaded in the reflection-only context.

Applies to

AssemblyCatalog(Assembly, ReflectionContext)

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

Initializes a new instance of the AssemblyCatalog class with the specified assembly and reflection context.

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)

Parameters

assembly
Assembly

The assembly that contains the attributed Type objects to add to the AssemblyCatalog object.

reflectionContext
ReflectionContext

The context used by the catalog to interpret types.

Exceptions

assembly or reflectionContext is null.

-or-

assembly was loaded in the reflection-only context.

Applies to

AssemblyCatalog(String, ICompositionElement)

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

Initializes a new instance of the AssemblyCatalog class with the specified code base.

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)

Parameters

codeBase
String

A string that specifies the code base of the assembly (that is, the path to the assembly file) that contains the attributed Type objects to add to the AssemblyCatalog object.

definitionOrigin
ICompositionElement

The element used by diagnostics to identify the sources of parts.

Exceptions

codeBase is not a valid assembly.

-or-

Version 2.0 or later of the common language runtime is currently loaded and codeBase was compiled with a later version.

The caller does not have path discovery permission.

codeBase could not be loaded.

-or-

codeBase specified a directory.

codebase or definitionOrigin is null.

codeBase is not found.

codeBase is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.

The specified path, file name, or both exceed the system-defined maximum length.

Remarks

The assembly referenced by codeBase is loaded into the Load context.

Applies to

AssemblyCatalog(String, ReflectionContext)

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

Initializes a new instance of the AssemblyCatalog class with the specified code base and reflection context.

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)

Parameters

codeBase
String

A string that specifies the code base of the assembly (that is, the path to the assembly file) that contains the attributed Type objects to add to the AssemblyCatalog object.

reflectionContext
ReflectionContext

The context used by the catalog to interpret types.

Exceptions

codeBase is not a valid assembly.

-or-

Version 2.0 or later of the common language runtime is currently loaded and codeBase was compiled with a later version.

The caller does not have path discovery permission.

codeBase could not be loaded.

-or-

codeBase specified a directory.

codebase or reflectionContext is null.

codeBase is not found.

codeBase is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.

The specified path, file name, or both exceed the system-defined maximum length.

Remarks

The assembly referenced bycodebase is loaded into the Load context.

Applies to

AssemblyCatalog(Assembly, ReflectionContext, ICompositionElement)

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

Initializes a new instance of the AssemblyCatalog class with the specified assembly and reflection context.

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)

Parameters

assembly
Assembly

The assembly that contains the attributed Type objects to add to the AssemblyCatalog object.

reflectionContext
ReflectionContext

The context used by the catalog to interpret types.

definitionOrigin
ICompositionElement

The element used by diagnostics to identify the sources of parts.

Exceptions

assembly, definitionOrigin, or reflectionContext is null.

-or-

assembly was loaded in the reflection-only context.

Applies to

AssemblyCatalog(String, ReflectionContext, ICompositionElement)

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

Initializes a new instance of the AssemblyCatalog class with the specified code base and reflection context.

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)

Parameters

codeBase
String

A string that specifies the code base of the assembly (that is, the path to the assembly file) that contains the attributed Type objects to add to the AssemblyCatalog object.

reflectionContext
ReflectionContext

The context used by the catalog to interpret types.

definitionOrigin
ICompositionElement

The element used by diagnostics to identify the sources of parts.

Exceptions

codeBase is not a valid assembly.

-or-

Version 2.0 or later of the common language runtime is currently loaded and codeBase was compiled with a later version.

The caller does not have path discovery permission.

codeBase could not be loaded.

-or-

codeBase specified a directory.

codebase, definitionOrigin or reflectionContext is null.

codeBase is not found.

codeBase is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.

The specified path, file name, or both exceed the system-defined maximum length.

Remarks

The assembly referenced by codebase is loaded into the Load context.

Applies to