ToolsetCollection 类

定义

表示一个或多个 Toolset 对象。Represents one or more Toolset objects. 工具集是工具集版本(例如“2.0”)、工具路径和一组可选的关联属性的组合。A Toolset is a combination of a Toolset version (such as "2.0"), a tools path, and an optional set of associated properties.

public ref class ToolsetCollection : System::Collections::Generic::ICollection<Microsoft::Build::BuildEngine::Toolset ^>, System::Collections::Generic::IEnumerable<Microsoft::Build::BuildEngine::Toolset ^>
public class ToolsetCollection : System.Collections.Generic.ICollection<Microsoft.Build.BuildEngine.Toolset>, System.Collections.Generic.IEnumerable<Microsoft.Build.BuildEngine.Toolset>
type ToolsetCollection = class
    interface ICollection<Toolset>
    interface seq<Toolset>
    interface IEnumerable
Public Class ToolsetCollection
Implements ICollection(Of Toolset), IEnumerable(Of Toolset)
继承
ToolsetCollection
实现

注解

ToolsetCollection允许您通过传递对应Toolset于所需Toolset的工具版本的字符串值来检索各个对象。ToolsetCollection allows you to retrieve individual Toolset objects by passing the string value of the tools version corresponding with the desired Toolset.

属性

Count

获取一个值,该值指示 ToolsetToolsetCollection 对象的数目。Gets a value indicating the number of Toolset objects in the ToolsetCollection.

IsReadOnly

获取该 ToolsetCollection 是否为只读。Gets whether the ToolsetCollection is read-only. IsReadOnly 始终返回 false,原因是工具集总是可写的。IsReadOnly always returns false because Toolsets are always writable.

Item[String]

获取与指定的工具版本关联的 ToolsetGets the Toolset associated with the specified tools version.

ToolsVersions

获取存储在此集合中的 Toolset 的名称。Gets the names of the Toolsets stored in this collection.

方法

Add(Toolset)

将指定的 Toolset 添加到此集合。Adds the specified Toolset to this collection.

Clear()

不支持此方法。This method is not supported.

Contains(String)

获取集合是否包含具有指定工具版本的 ToolsetGets whether the collection contains a Toolset with the specified tools version.

Contains(Toolset)

获取集合是否包含具有指定 Toolset 名称的 ToolsetCollectionGets whether the collection contains a Toolset with the specified ToolsetCollection name.

CopyTo(Toolset[], Int32)

ToolsetCollection 的内容复制到兼容的一维 Array,从目标数组的指定索引处开始复制。Copies the contents of the ToolsetCollection to a compatible one-dimensional Array, starting at the specified index of the target array.

Equals(Object)

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

(继承自 Object)
GetEnumerator()

获取循环访问 ToolsetCollection 的枚举数。Gets an enumerator that iterates through the ToolsetCollection.

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)
Remove(Toolset)

不支持此方法。This method is not supported.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

显式界面实现

IEnumerable.GetEnumerator()

此集合中工具集的泛型枚举器。Non-generic enumerator for the Toolsets in this collection.

扩展方法

CopyToDataTable<T>(IEnumerable<T>)

在给定其泛型参数 TDataTable 的输入 DataRow 对象的情况下,返回包含 IEnumerable<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)

在给定其泛型参数 TDataRow 的输入 DataTable 对象的情况下,将 IEnumerable<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)

在给定其泛型参数 TDataRow 的输入 DataTable 对象的情况下,将 IEnumerable<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.

适用于