Edytuj

Udostępnij za pośrednictwem


DirectoryCatalog Constructors

Definition

Initializes a new instance of the DirectoryCatalog class.

Overloads

DirectoryCatalog(String)

Initializes a new instance of the DirectoryCatalog class by using ComposablePartDefinition objects based on all the DLL files in the specified directory path.

DirectoryCatalog(String, ICompositionElement)

Initializes a new instance of the DirectoryCatalog class by using ComposablePartDefinition objects based on all the DLL files in the specified directory path with the specified source for parts.

DirectoryCatalog(String, ReflectionContext)

Initializes a new instance of the DirectoryCatalog class by using ComposablePartDefinition objects based on all the DLL files in the specified directory path, in the specified reflection context.

DirectoryCatalog(String, String)

Initializes a new instance of the DirectoryCatalog class by using ComposablePartDefinition objects that match a specified search pattern in the specified directory path.

DirectoryCatalog(String, ReflectionContext, ICompositionElement)

Initializes a new instance of the DirectoryCatalog class by using ComposablePartDefinition objects based on all the DLL files in the specified directory path, in the specified reflection context.

DirectoryCatalog(String, String, ICompositionElement)

Initializes a new instance of the DirectoryCatalog class by using ComposablePartDefinition objects based on the specified search pattern in the specified directory path with the specified source for parts.

DirectoryCatalog(String, String, ReflectionContext)

Initializes a new instance of the DirectoryCatalog class by using ComposablePartDefinition objects based on the specified search pattern in the specified directory path, using the specified reflection context.

DirectoryCatalog(String, String, ReflectionContext, ICompositionElement)

Initializes a new instance of the DirectoryCatalog class by using ComposablePartDefinition objects based on the specified search pattern in the specified directory path, using the specified reflection context.

DirectoryCatalog(String)

Source:
DirectoryCatalog.cs
Source:
DirectoryCatalog.cs
Source:
DirectoryCatalog.cs

Initializes a new instance of the DirectoryCatalog class by using ComposablePartDefinition objects based on all the DLL files in the specified directory path.

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

Parameters

path
String

The path to the directory to scan for assemblies to add to the catalog.

The path must be absolute or relative to BaseDirectory.

Exceptions

The specified path is invalid (for example, it is on an unmapped drive).

path is null.

The caller does not have the required permission.

path is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.

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

Applies to

DirectoryCatalog(String, ICompositionElement)

Source:
DirectoryCatalog.cs
Source:
DirectoryCatalog.cs
Source:
DirectoryCatalog.cs

Initializes a new instance of the DirectoryCatalog class by using ComposablePartDefinition objects based on all the DLL files in the specified directory path with the specified source for parts.

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

Parameters

path
String

The path to the directory to scan for assemblies to add to the catalog.

The path must be absolute or relative to BaseDirectory.

definitionOrigin
ICompositionElement

The element used by diagnostics to identify the source for parts.

Exceptions

The specified path is invalid (for example, it is on an unmapped drive).

path is null.

The caller does not have the required permission.

path is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.

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

Applies to

DirectoryCatalog(String, ReflectionContext)

Source:
DirectoryCatalog.cs
Source:
DirectoryCatalog.cs
Source:
DirectoryCatalog.cs

Initializes a new instance of the DirectoryCatalog class by using ComposablePartDefinition objects based on all the DLL files in the specified directory path, in the specified reflection context.

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

Parameters

path
String

The path to the directory to scan for assemblies to add to the catalog.

The path must be absolute or relative to BaseDirectory.

reflectionContext
ReflectionContext

The context used to create parts.

Exceptions

The specified path is invalid (for example, it is on an unmapped drive).

path is null.

The caller does not have the required permission.

path is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.

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

Applies to

DirectoryCatalog(String, String)

Source:
DirectoryCatalog.cs
Source:
DirectoryCatalog.cs
Source:
DirectoryCatalog.cs

Initializes a new instance of the DirectoryCatalog class by using ComposablePartDefinition objects that match a specified search pattern in the specified directory path.

public:
 DirectoryCatalog(System::String ^ path, System::String ^ searchPattern);
public DirectoryCatalog (string path, string searchPattern);
new System.ComponentModel.Composition.Hosting.DirectoryCatalog : string * string -> System.ComponentModel.Composition.Hosting.DirectoryCatalog
Public Sub New (path As String, searchPattern As String)

Parameters

path
String

The path to the directory to scan for assemblies to add to the catalog.

The path must be absolute or relative to BaseDirectory.

searchPattern
String

The search string. The format of the string should be the same as specified for the GetFiles(String, String) method.

Exceptions

The specified path is invalid (for example, it is on an unmapped drive).

path or searchPattern is null.

The caller does not have the required permission.

path is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.

-or-

searchPattern does not contain a valid pattern.

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

Applies to

DirectoryCatalog(String, ReflectionContext, ICompositionElement)

Source:
DirectoryCatalog.cs
Source:
DirectoryCatalog.cs
Source:
DirectoryCatalog.cs

Initializes a new instance of the DirectoryCatalog class by using ComposablePartDefinition objects based on all the DLL files in the specified directory path, in the specified reflection context.

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

Parameters

path
String

The path to the directory to scan for assemblies to add to the catalog.

The path must be absolute or relative to BaseDirectory.

reflectionContext
ReflectionContext

The context used to create parts.

definitionOrigin
ICompositionElement

The element used by diagnostics to identify the source for parts.

Exceptions

The specified path is invalid (for example, it is on an unmapped drive).

path is null.

The caller does not have the required permission.

path is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.

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

Applies to

DirectoryCatalog(String, String, ICompositionElement)

Source:
DirectoryCatalog.cs
Source:
DirectoryCatalog.cs
Source:
DirectoryCatalog.cs

Initializes a new instance of the DirectoryCatalog class by using ComposablePartDefinition objects based on the specified search pattern in the specified directory path with the specified source for parts.

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

Parameters

path
String

The path to the directory to scan for assemblies to add to the catalog.

The path must be absolute or relative to BaseDirectory.

searchPattern
String

The search string. The format of the string should be the same as specified for the GetFiles(String, String) method.

definitionOrigin
ICompositionElement

The element used by diagnostics to identify the source for parts.

Exceptions

The specified path is invalid (for example, it is on an unmapped drive).

path or searchPattern is null.

The caller does not have the required permission.

path is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.

-or-

searchPattern does not contain a valid pattern.

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

Applies to

DirectoryCatalog(String, String, ReflectionContext)

Source:
DirectoryCatalog.cs
Source:
DirectoryCatalog.cs
Source:
DirectoryCatalog.cs

Initializes a new instance of the DirectoryCatalog class by using ComposablePartDefinition objects based on the specified search pattern in the specified directory path, using the specified reflection context.

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

Parameters

path
String

The path to the directory to scan for assemblies to add to the catalog.

The path must be absolute or relative to BaseDirectory.

searchPattern
String

The search string. The format of the string should be the same as specified for the GetFiles(String, String) method.

reflectionContext
ReflectionContext

The context used to create parts.

Exceptions

The specified path is invalid (for example, it is on an unmapped drive).

path or searchPattern is null.

The caller does not have the required permission.

path is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.

-or-

searchPattern does not contain a valid pattern.

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

Applies to

DirectoryCatalog(String, String, ReflectionContext, ICompositionElement)

Source:
DirectoryCatalog.cs
Source:
DirectoryCatalog.cs
Source:
DirectoryCatalog.cs

Initializes a new instance of the DirectoryCatalog class by using ComposablePartDefinition objects based on the specified search pattern in the specified directory path, using the specified reflection context.

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

Parameters

path
String

The path to the directory to scan for assemblies to add to the catalog.

The path must be absolute or relative to BaseDirectory.

searchPattern
String

The search string. The format of the string should be the same as specified for the GetFiles(String, String) method.

reflectionContext
ReflectionContext

The context used to create parts.

definitionOrigin
ICompositionElement

The element used by diagnostics to identify the source for parts.

Exceptions

The specified path is invalid (for example, it is on an unmapped drive).

path or searchPattern is null.

The caller does not have the required permission.

path is a zero-length string, contains only white space, or contains one or more implementation-specific invalid characters.

-or-

searchPattern does not contain a valid pattern.

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

Applies to