IdentityReferenceCollection 类

定义

表示 IdentityReference 对象的集合,并提供一种方法将 IdentityReference 派生的对象集转换为 IdentityReference 派生的类型。Represents a collection of IdentityReference objects and provides a means of converting sets of IdentityReference-derived objects to IdentityReference-derived types.

public ref class IdentityReferenceCollection : System::Collections::Generic::ICollection<System::Security::Principal::IdentityReference ^>, System::Collections::Generic::IEnumerable<System::Security::Principal::IdentityReference ^>
[System.Runtime.InteropServices.ComVisible(false)]
public class IdentityReferenceCollection : System.Collections.Generic.ICollection<System.Security.Principal.IdentityReference>, System.Collections.Generic.IEnumerable<System.Security.Principal.IdentityReference>
type IdentityReferenceCollection = class
    interface IEnumerable
    interface ICollection<IdentityReference>
    interface seq<IdentityReference>
Public Class IdentityReferenceCollection
Implements ICollection(Of IdentityReference), IEnumerable(Of IdentityReference)
继承
IdentityReferenceCollection
属性
实现

构造函数

IdentityReferenceCollection()

用集合中的零项初始化 IdentityReferenceCollection 类的新实例。Initializes a new instance of the IdentityReferenceCollection class with zero items in the collection.

IdentityReferenceCollection(Int32)

使用指定的初始大小初始化 IdentityReferenceCollection 类的新实例。Initializes a new instance of the IdentityReferenceCollection class by using the specified initial size.

属性

Count

获取 IdentityReferenceCollection 集合中项的数目。Gets the number of items in the IdentityReferenceCollection collection.

IsReadOnly

获取一个值,该值指示 IdentityReferenceCollection 集合是否是只读的。Gets a value that indicates whether the IdentityReferenceCollection collection is read-only.

Item[Int32]

获取或设置 IdentityReferenceCollection 集合中指定索引处的节点。Sets or gets the node at the specified index of the IdentityReferenceCollection collection.

方法

Add(IdentityReference)

IdentityReference 对象添加到 IdentityReferenceCollection 集合中。Adds an IdentityReference object to the IdentityReferenceCollection collection.

Clear()

IdentityReferenceCollection 集合中清除所有 IdentityReference 对象。Clears all IdentityReference objects from the IdentityReferenceCollection collection.

Contains(IdentityReference)

指示 IdentityReferenceCollection 集合是否包含指定的 IdentityReference 对象。Indicates whether the IdentityReferenceCollection collection contains the specified IdentityReference object.

CopyTo(IdentityReference[], Int32)

从指定的索引开始,将 IdentityReferenceCollection 集合复制到一个 IdentityReferenceCollection 数组中。Copies the IdentityReferenceCollection collection to an IdentityReferenceCollection array, starting at the specified index.

Equals(Object)

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

(继承自 Object)
GetEnumerator()

获取一个可用于循环访问 IdentityReferenceCollection 集合的枚举数。Gets an enumerator that can be used to iterate through the IdentityReferenceCollection collection.

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(IdentityReference)

从集合中移除指定的 IdentityReference 对象。Removes the specified IdentityReference object from the collection.

ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)
Translate(Type)

将集合中的对象转换为指定类型。Converts the objects in the collection to the specified type. 调用此方法与调用第二个参数设置为 falseTranslate(Type, Boolean) 一样,这意味着对于转换失败的项不会引发异常。Calling this method is the same as calling Translate(Type, Boolean) with the second parameter set to false, which means that exceptions will not be thrown for items that fail conversion.

Translate(Type, Boolean)

将集合中的对象转换为指定类型,并使用指定容错机制处理或忽略与不具有转换映射的类型相关联的错误。Converts the objects in the collection to the specified type and uses the specified fault tolerance to handle or ignore errors associated with a type not having a conversion mapping.

显式界面实现

ICollection<IdentityReference>.IsReadOnly
IEnumerable.GetEnumerator()

获取一个可用于循环访问 IdentityReferenceCollection 集合的枚举数。Gets an enumerator that can be used to iterate through the IdentityReferenceCollection 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.

适用于