ApplicationCatalog 类

定义

发现动态链接库 (DLL) 中的特性化部分以及应用程序目录和路径中的 EXE 文件。Discovers attributed parts in the dynamic link library (DLL) and EXE files in an application's directory and path.

public ref class ApplicationCatalog : System::ComponentModel::Composition::Primitives::ComposablePartCatalog, System::ComponentModel::Composition::Primitives::ICompositionElement
public class ApplicationCatalog : System.ComponentModel.Composition.Primitives.ComposablePartCatalog, System.ComponentModel.Composition.Primitives.ICompositionElement
type ApplicationCatalog = class
    inherit ComposablePartCatalog
    interface ICompositionElement
Public Class ApplicationCatalog
Inherits ComposablePartCatalog
Implements ICompositionElement
继承
ApplicationCatalog
实现

注解

重要

此类型实现 IDisposable 接口。This type implements the IDisposable interface. 在使用完类型后,您应直接或间接释放类型。When you have finished using the type, you should dispose of it either directly or indirectly. 若要直接释放类型,请在 try/catch 块中调用其 Dispose 方法。To dispose of the type directly, call its Dispose method in a try/catch block. 若要间接释放类型,请使用 using(在 C# 中)或 Using(在 Visual Basic 中)等语言构造。To dispose of it indirectly, use a language construct such as using (in C#) or Using (in Visual Basic). 有关详细信息,请参阅 IDisposable 接口主题中的“使用实现 IDisposable 的对象”一节。For more information, see the "Using an Object that Implements IDisposable" section in the IDisposable interface topic.

构造函数

ApplicationCatalog()

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

ApplicationCatalog(ICompositionElement)

通过部分使用指定相对源模式初始化 ApplicationCatalog 类的新实例。Initializes a new instance of the ApplicationCatalog class by using the specified source for parts.

ApplicationCatalog(ReflectionContext)

使用指定的反射上下文来初始化 ApplicationCatalog 类的新实例。Initializes a new instance of the ApplicationCatalog class by using the specified reflection context.

ApplicationCatalog(ReflectionContext, ICompositionElement)

通过部分使用指定相对反射上下文和源模式初始化 ApplicationCatalog 类的新实例。Initializes a new instance of the ApplicationCatalog class by using the specified reflection context and source for parts.

属性

Parts

获取目录中包含的部件定义。Gets the part definitions that are contained in the catalog.

(继承自 ComposablePartCatalog)

方法

Dispose()

释放 ComposablePartCatalog 使用的所有资源。Releases all resources used by the ComposablePartCatalog.

(继承自 ComposablePartCatalog)
Dispose(Boolean)

释放由 DirectoryCatalog 占用的非托管资源,还可以另外再释放托管资源。Releases the unmanaged resources used by the DirectoryCatalog and optionally releases the managed resources.

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetEnumerator()

返回一个循环访问集合的枚举器。Returns an enumerator that iterates through the collection.

GetExports(ImportDefinition)

获取与指定的定义所表示的约束相匹配的导入定义。Gets the export definitions that match the constraint expressed by the specified import definition.

GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

检索应用程序目录的字符串表示形式。Retrieves a string representation of the application catalog.

显式接口实现

ICompositionElement.DisplayName

获取应用程序目录的显示名称。Gets the display name of the application catalog.

ICompositionElement.Origin

获取应用程序目录源自于的组合元素。Gets the composition element from which the application catalog originated.

IEnumerable.GetEnumerator()

返回一个循环访问类别的枚举器。Returns an enumerator that iterates through the catalog.

(继承自 ComposablePartCatalog)

扩展方法

CreateCompositionService(ComposablePartCatalog)

用作为导出源的指定目录创建新复合服务。Creates a new composition service by using the specified catalog as a source for exports.

Filter(ComposablePartCatalog, Func<ComposablePartDefinition,Boolean>)

用指定的筛选功能筛选指定的目录。Filters the specified catalog with the specified filter function.

CopyToDataTable<T>(IEnumerable<T>)

在给定其泛型参数 DataTableDataRow 的输入 IEnumerable<T> 对象的情况下,返回包含 T 对象副本的 DataRowReturns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

在给定其泛型参数 DataRowDataTable 的输入 IEnumerable<T> 对象的情况下,将 T 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

在给定其泛型参数 DataRowDataTable 的输入 IEnumerable<T> 对象的情况下,将 T 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个节点的上级。Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个节点的上级。Returns a filtered collection of elements that contains the ancestors of every node in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子代节点的集合。Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>)

返回源集合中每个元素和文档的子元素的集合。Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName)

返回源集合中经过筛选的每个元素和文档的子元素集合。Returns a filtered collection of the child elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>)

返回节点集合(其中包含源集合中的所有节点),并按文档顺序排列。Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子节点集合。Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>)

将源集合中的每个节点从其父节点中移除。Removes every node in the source collection from its parent node.

适用于