ActivityCollection ActivityCollection ActivityCollection ActivityCollection Class

定义

警告

此 API 现已过时。

ICollection 类型的强类型 Activity 进行建模。Models a strongly typed ICollection of type Activity.

public ref class ActivityCollection sealed : System::Collections::Generic::List<System::Workflow::ComponentModel::Activity ^>, System::Collections::Generic::ICollection<System::Workflow::ComponentModel::Activity ^>, System::Collections::Generic::IEnumerable<System::Workflow::ComponentModel::Activity ^>, System::Collections::Generic::IList<System::Workflow::ComponentModel::Activity ^>
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public sealed class ActivityCollection : System.Collections.Generic.List<System.Workflow.ComponentModel.Activity>, System.Collections.Generic.ICollection<System.Workflow.ComponentModel.Activity>, System.Collections.Generic.IEnumerable<System.Workflow.ComponentModel.Activity>, System.Collections.Generic.IList<System.Workflow.ComponentModel.Activity>
type ActivityCollection = class
    inherit List<Activity>
    interface IList<Activity>
    interface ICollection<Activity>
    interface seq<Activity>
    interface IEnumerable
    interface IList
    interface ICollection
Public NotInheritable Class ActivityCollection
Inherits List(Of Activity)
Implements ICollection(Of Activity), IEnumerable(Of Activity), IList(Of Activity)
继承
ActivityCollectionActivityCollectionActivityCollectionActivityCollection
属性
实现

示例

下面的示例演示如何访问 ActivityCollection,它是复合活动类的成员,其中包含所有子活动。The following example shows access of the ActivityCollection which is the member of a composite activity class containing all child activities. 此代码示例摘自 ThrowWorkflow.cs 文件中的“使用引发 SDK”示例。This code example is part of the Using Throw SDK Sample and is from the ThrowWorkflow.cs file. 有关详细信息,请参阅使用 ThrowActivity 活动For more information, see Using the ThrowActivity Activity.

this.CanModifyActivities = true;
System.Workflow.ComponentModel.ActivityBind activitybind1 = new System.Workflow.ComponentModel.ActivityBind();
this.throwActivity1 = new System.Workflow.ComponentModel.ThrowActivity();
activitybind1.Name = "ThrowWorkflow";
activitybind1.Path = "ThrownException";
// 
// throwActivity1
// 
this.throwActivity1.Name = "throwActivity1";
this.throwActivity1.SetBinding(System.Workflow.ComponentModel.ThrowActivity.FaultProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
// 
// ThrowWorkflow
// 
this.Activities.Add(this.throwActivity1);
this.Name = "ThrowWorkflow";
this.CanModifyActivities = false;
Me.CanModifyActivities = True
Dim activitybind1 As New System.Workflow.ComponentModel.ActivityBind()
Me.throwActivity1 = New System.Workflow.ComponentModel.ThrowActivity()
activitybind1.Name = "ThrowWorkflow"
activitybind1.Path = "ThrownException"
' 
' throwActivity1
' 
Me.throwActivity1.Name = "throwActivity1"
Me.throwActivity1.SetBinding(System.Workflow.ComponentModel.ThrowActivity.FaultProperty, activitybind1)
' 
' ThrowWorkflow
' 
Me.Activities.Add(Me.throwActivity1)
Me.Name = "ThrowWorkflow"
Me.CanModifyActivities = False

注解

备注

本材料讨论的类型和命名空间已废弃不用。This material discusses types and namespaces that are obsolete. 有关详细信息,请参阅 Windows Workflow Foundation 4.5 中弃用的类型For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

此类用于表示 CompositeActivity 的子活动的列表。This class is used to represent the list of child activities for a CompositeActivity.

备注

只调用从 IList<T> 而不是从 List<T> 派生的方法,例如使用 Add 而不是 AddRange 来添加活动。Only call methods derived from IList<T> and not List<T>, such as using Add to add activities instead of AddRange. 调用从 List<T> 派生的方法将会产生意外的结果。Calling methods derived from List<T> will have unexpected consequences.

构造函数

ActivityCollection(Activity) ActivityCollection(Activity) ActivityCollection(Activity) ActivityCollection(Activity)

初始化 ActivityCollection 类的新实例,同时初始化所有者 ActivityInitializes a new instance of the ActivityCollection class, initializing an owner Activity.

属性

Capacity Capacity Capacity Capacity

获取或设置该内部数据结构在不调整大小的情况下能够容纳的元素总数。Gets or sets the total number of elements the internal data structure can hold without resizing.

(Inherited from List<T>)
Count Count Count Count

获取 ICollection 的成员数。Gets the number of members of the ICollection.

ICollection<T>.IsReadOnly ICollection<T>.IsReadOnly ICollection<T>.IsReadOnly ICollection<T>.IsReadOnly

获取一个值,该值指示 ICollection<T> 是否为只读。Gets a value indicating whether the ICollection<T> is read-only.

(Inherited from List<T>)
Item[Int32] Item[Int32] Item[Int32] Item[Int32]

根据索引获取或设置 ICollection 中的活动。Gets or sets the activity in the ICollection based on the index.

Item[String] Item[String] Item[String] Item[String]

根据作为唯一键的字符串来获取 ICollection 中的活动。Gets the activity in the ICollection based on the string which is a unique key.

方法

Add(Activity) Add(Activity) Add(Activity) Add(Activity)

Activity 添加到 ICollectionAdds the Activity to the ICollection.

Add(T) Add(T) Add(T) Add(T)

将对象添加到 List<T> 的结尾处。Adds an object to the end of the List<T>.

(Inherited from List<T>)
AddRange(IEnumerable<T>) AddRange(IEnumerable<T>) AddRange(IEnumerable<T>) AddRange(IEnumerable<T>)

将指定集合的元素添加到 List<T> 的末尾。Adds the elements of the specified collection to the end of the List<T>.

(Inherited from List<T>)
AsReadOnly() AsReadOnly() AsReadOnly() AsReadOnly()

返回当前集合的只读 ReadOnlyCollection<T> 包装器。Returns a read-only ReadOnlyCollection<T> wrapper for the current collection.

(Inherited from List<T>)
BinarySearch(Int32, Int32, T, IComparer<T>) BinarySearch(Int32, Int32, T, IComparer<T>) BinarySearch(Int32, Int32, T, IComparer<T>) BinarySearch(Int32, Int32, T, IComparer<T>)

使用指定的比较器在已排序 List<T> 的某个元素范围中搜索元素,并返回该元素从零开始的索引。Searches a range of elements in the sorted List<T> for an element using the specified comparer and returns the zero-based index of the element.

(Inherited from List<T>)
BinarySearch(T) BinarySearch(T) BinarySearch(T) BinarySearch(T)

使用默认的比较器在整个已排序的 List<T> 中搜索元素,并返回该元素从零开始的索引。Searches the entire sorted List<T> for an element using the default comparer and returns the zero-based index of the element.

(Inherited from List<T>)
BinarySearch(T, IComparer<T>) BinarySearch(T, IComparer<T>) BinarySearch(T, IComparer<T>) BinarySearch(T, IComparer<T>)

使用指定的比较器在整个已排序的 List<T> 中搜索元素,并返回该元素从零开始的索引。Searches the entire sorted List<T> for an element using the specified comparer and returns the zero-based index of the element.

(Inherited from List<T>)
Clear() Clear() Clear() Clear()

Activity 中移除所有 ICollectionRemoves every Activity from the ICollection.

Contains(Activity) Contains(Activity) Contains(Activity) Contains(Activity)

提供 ActivityICollection 的成员资格测试。Provides a test for membership of the Activity in the ICollection.

Contains(T) Contains(T) Contains(T) Contains(T)

确定某元素是否在 List<T> 中。Determines whether an element is in the List<T>.

(Inherited from List<T>)
ConvertAll<TOutput>(Converter<T,TOutput>) ConvertAll<TOutput>(Converter<T,TOutput>) ConvertAll<TOutput>(Converter<T,TOutput>) ConvertAll<TOutput>(Converter<T,TOutput>)

将当前 List<T> 中的元素转换为另一种类型,并返回包含已转换元素的列表。Converts the elements in the current List<T> to another type, and returns a list containing the converted elements.

(Inherited from List<T>)
CopyTo(Int32, T[], Int32, Int32) CopyTo(Int32, T[], Int32, Int32) CopyTo(Int32, T[], Int32, Int32) CopyTo(Int32, T[], Int32, Int32)

将一定范围的元素从 List<T> 复制到兼容的一维数组中,从目标数组的指定索引位置开始放置。Copies a range of elements from the List<T> to a compatible one-dimensional array, starting at the specified index of the target array.

(Inherited from List<T>)
CopyTo(T[]) CopyTo(T[]) CopyTo(T[]) CopyTo(T[])

将整个 List<T> 复制到兼容的一维数组中,从目标数组的开头开始放置。Copies the entire List<T> to a compatible one-dimensional array, starting at the beginning of the target array.

(Inherited from List<T>)
CopyTo(T[], Int32) CopyTo(T[], Int32) CopyTo(T[], Int32) CopyTo(T[], Int32)

从目标数组的指定索引处开始,将整个 List<T> 复制到兼容的一维数组。Copies the entire List<T> to a compatible one-dimensional array, starting at the specified index of the target array.

(Inherited from List<T>)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from Object)
Exists(Predicate<T>) Exists(Predicate<T>) Exists(Predicate<T>) Exists(Predicate<T>)

确定 List<T> 是否包含与指定谓词所定义的条件相匹配的元素。Determines whether the List<T> contains elements that match the conditions defined by the specified predicate.

(Inherited from List<T>)
Find(Predicate<T>) Find(Predicate<T>) Find(Predicate<T>) Find(Predicate<T>)

搜索与指定谓词所定义的条件相匹配的元素,并返回整个 List<T> 中的第一个匹配元素。Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire List<T>.

(Inherited from List<T>)
FindAll(Predicate<T>) FindAll(Predicate<T>) FindAll(Predicate<T>) FindAll(Predicate<T>)

检索与指定谓词定义的条件匹配的所有元素。Retrieves all the elements that match the conditions defined by the specified predicate.

(Inherited from List<T>)
FindIndex(Int32, Int32, Predicate<T>) FindIndex(Int32, Int32, Predicate<T>) FindIndex(Int32, Int32, Predicate<T>) FindIndex(Int32, Int32, Predicate<T>)

搜索与指定谓词所定义的条件相匹配的一个元素,并返回 List<T> 中从指定的索引开始、包含指定元素个数的元素范围内第一个匹配项的从零开始的索引。Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the List<T> that starts at the specified index and contains the specified number of elements.

(Inherited from List<T>)
FindIndex(Int32, Predicate<T>) FindIndex(Int32, Predicate<T>) FindIndex(Int32, Predicate<T>) FindIndex(Int32, Predicate<T>)

搜索与指定谓词所定义的条件相匹配的元素,并返回 List<T> 中从指定索引到最后一个元素的元素范围内第一个匹配项的从零开始的索引。Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the List<T> that extends from the specified index to the last element.

(Inherited from List<T>)
FindIndex(Predicate<T>) FindIndex(Predicate<T>) FindIndex(Predicate<T>) FindIndex(Predicate<T>)

搜索与指定谓词所定义的条件相匹配的元素,并返回整个 List<T> 中第一个匹配元素的从零开始的索引。Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the entire List<T>.

(Inherited from List<T>)
FindLast(Predicate<T>) FindLast(Predicate<T>) FindLast(Predicate<T>) FindLast(Predicate<T>)

搜索与指定谓词所定义的条件相匹配的元素,并返回整个 List<T> 中的最后一个匹配元素。Searches for an element that matches the conditions defined by the specified predicate, and returns the last occurrence within the entire List<T>.

(Inherited from List<T>)
FindLastIndex(Int32, Int32, Predicate<T>) FindLastIndex(Int32, Int32, Predicate<T>) FindLastIndex(Int32, Int32, Predicate<T>) FindLastIndex(Int32, Int32, Predicate<T>)

搜索与指定谓词所定义的条件相匹配的元素,并返回 List<T> 中包含指定元素个数、到指定索引结束的元素范围内最后一个匹配项的从零开始的索引。Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the List<T> that contains the specified number of elements and ends at the specified index.

(Inherited from List<T>)
FindLastIndex(Int32, Predicate<T>) FindLastIndex(Int32, Predicate<T>) FindLastIndex(Int32, Predicate<T>) FindLastIndex(Int32, Predicate<T>)

搜索与由指定谓词定义的条件相匹配的元素,并返回 List<T> 中从第一个元素到指定索引的元素范围内最后一个匹配项的从零开始的索引。Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the List<T> that extends from the first element to the specified index.

(Inherited from List<T>)
FindLastIndex(Predicate<T>) FindLastIndex(Predicate<T>) FindLastIndex(Predicate<T>) FindLastIndex(Predicate<T>)

搜索与指定谓词所定义的条件相匹配的元素,并返回整个 List<T> 中最后一个匹配元素的从零开始的索引。Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the entire List<T>.

(Inherited from List<T>)
ForEach(Action<T>) ForEach(Action<T>) ForEach(Action<T>) ForEach(Action<T>)

List<T> 的每个元素执行指定操作。Performs the specified action on each element of the List<T>.

(Inherited from List<T>)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

实现到 ICollection 的枚举接口。Implements an enumeration interface to the ICollection.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

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

(Inherited from Object)
GetRange(Int32, Int32) GetRange(Int32, Int32) GetRange(Int32, Int32) GetRange(Int32, Int32)

创建源 List<T> 中的元素范围的浅表副本。Creates a shallow copy of a range of elements in the source List<T>.

(Inherited from List<T>)
GetType() GetType() GetType() GetType()

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

(Inherited from Object)
IndexOf(Activity) IndexOf(Activity) IndexOf(Activity) IndexOf(Activity)

获取 ActivityICollection 的索引。Gets the index of the Activity in the ICollection.

IndexOf(T) IndexOf(T) IndexOf(T) IndexOf(T)

搜索指定的对象,并返回整个 List<T> 中第一个匹配项的从零开始的索引。Searches for the specified object and returns the zero-based index of the first occurrence within the entire List<T>.

(Inherited from List<T>)
IndexOf(T, Int32) IndexOf(T, Int32) IndexOf(T, Int32) IndexOf(T, Int32)

搜索指定的对象,并返回 List<T> 中从指定索引到最后一个元素的元素范围内第一个匹配项的从零开始的索引。Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the List<T> that extends from the specified index to the last element.

(Inherited from List<T>)
IndexOf(T, Int32, Int32) IndexOf(T, Int32, Int32) IndexOf(T, Int32, Int32) IndexOf(T, Int32, Int32)

搜索指定对象并返回 List<T> 中从指定索引开始并包含指定元素数的这部分元素中第一个匹配项的从零开始索引。Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the List<T> that starts at the specified index and contains the specified number of elements.

(Inherited from List<T>)
Insert(Int32, Activity) Insert(Int32, Activity) Insert(Int32, Activity) Insert(Int32, Activity)

ICollection 中的索引位置插入项。Inserts the item at the index in the ICollection.

Insert(Int32, T) Insert(Int32, T) Insert(Int32, T) Insert(Int32, T)

将元素插入 List<T> 的指定索引处。Inserts an element into the List<T> at the specified index.

(Inherited from List<T>)
InsertRange(Int32, IEnumerable<T>) InsertRange(Int32, IEnumerable<T>) InsertRange(Int32, IEnumerable<T>) InsertRange(Int32, IEnumerable<T>)

将集合中的元素插入 List<T> 的指定索引处。Inserts the elements of a collection into the List<T> at the specified index.

(Inherited from List<T>)
LastIndexOf(T) LastIndexOf(T) LastIndexOf(T) LastIndexOf(T)

搜索指定的对象,并返回整个 List<T> 中最后一个匹配项的从零开始的索引。Searches for the specified object and returns the zero-based index of the last occurrence within the entire List<T>.

(Inherited from List<T>)
LastIndexOf(T, Int32) LastIndexOf(T, Int32) LastIndexOf(T, Int32) LastIndexOf(T, Int32)

搜索指定的对象,并返回 List<T> 中从第一个元素到指定索引的元素范围内最后一个匹配项的从零开始的索引。Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the List<T> that extends from the first element to the specified index.

(Inherited from List<T>)
LastIndexOf(T, Int32, Int32) LastIndexOf(T, Int32, Int32) LastIndexOf(T, Int32, Int32) LastIndexOf(T, Int32, Int32)

搜索指定对象并返回 List<T> 中到指定索引为止包含指定元素数的这部分元素中最后一个匹配项的从零开始索引。Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the List<T> that contains the specified number of elements and ends at the specified index.

(Inherited from List<T>)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

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

(Inherited from Object)
Remove(Activity) Remove(Activity) Remove(Activity) Remove(Activity)

ICollection 中移除在调用中指定的活动。Removes the activity specified in the call from the ICollection.

Remove(T) Remove(T) Remove(T) Remove(T)

List<T> 中移除特定对象的第一个匹配项。Removes the first occurrence of a specific object from the List<T>.

(Inherited from List<T>)
RemoveAll(Predicate<T>) RemoveAll(Predicate<T>) RemoveAll(Predicate<T>) RemoveAll(Predicate<T>)

移除与指定的谓词所定义的条件相匹配的所有元素。Removes all the elements that match the conditions defined by the specified predicate.

(Inherited from List<T>)
RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32)

移除 Activity 中位于指定的 ICollection 处的 indexRemoves the Activity in the ICollection at the specified index.

RemoveRange(Int32, Int32) RemoveRange(Int32, Int32) RemoveRange(Int32, Int32) RemoveRange(Int32, Int32)

List<T> 中移除一定范围的元素。Removes a range of elements from the List<T>.

(Inherited from List<T>)
Reverse() Reverse() Reverse() Reverse()

将整个 List<T> 中元素的顺序反转。Reverses the order of the elements in the entire List<T>.

(Inherited from List<T>)
Reverse(Int32, Int32) Reverse(Int32, Int32) Reverse(Int32, Int32) Reverse(Int32, Int32)

将指定范围中元素的顺序反转。Reverses the order of the elements in the specified range.

(Inherited from List<T>)
Sort() Sort() Sort() Sort()

使用默认比较器对整个 List<T> 中的元素进行排序。Sorts the elements in the entire List<T> using the default comparer.

(Inherited from List<T>)
Sort(Comparison<T>) Sort(Comparison<T>) Sort(Comparison<T>) Sort(Comparison<T>)

使用指定的 Comparison<T>,对整个 List<T> 中的元素进行排序。Sorts the elements in the entire List<T> using the specified Comparison<T>.

(Inherited from List<T>)
Sort(IComparer<T>) Sort(IComparer<T>) Sort(IComparer<T>) Sort(IComparer<T>)

使用指定的比较器对整个 List<T> 中的元素进行排序。Sorts the elements in the entire List<T> using the specified comparer.

(Inherited from List<T>)
Sort(Int32, Int32, IComparer<T>) Sort(Int32, Int32, IComparer<T>) Sort(Int32, Int32, IComparer<T>) Sort(Int32, Int32, IComparer<T>)

使用指定的比较器对 List<T> 中某个范围内的元素进行排序。Sorts the elements in a range of elements in List<T> using the specified comparer.

(Inherited from List<T>)
ToArray() ToArray() ToArray() ToArray()

List<T> 的元素复制到新数组中。Copies the elements of the List<T> to a new array.

(Inherited from List<T>)
ToString() ToString() ToString() ToString()

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

(Inherited from Object)
TrimExcess() TrimExcess() TrimExcess() TrimExcess()

将容量设置为 List<T> 中的实际元素数目(如果该数目小于某个阈值)。Sets the capacity to the actual number of elements in the List<T>, if that number is less than a threshold value.

(Inherited from List<T>)
TrueForAll(Predicate<T>) TrueForAll(Predicate<T>) TrueForAll(Predicate<T>) TrueForAll(Predicate<T>)

确定是否 List<T> 中的每个元素都与指定的谓词所定义的条件相匹配。Determines whether every element in the List<T> matches the conditions defined by the specified predicate.

(Inherited from List<T>)

事件

ListChanged ListChanged ListChanged ListChanged

每当对此 ICollection 的内容进行更改时引发。Raised whenever a change is made to the contents of this ICollection.

显式界面实现

ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32)

从特定的 ICollection 索引处开始,将 Array 的元素复制到一个 Array 中。Copies the elements of the ICollection to an Array, starting at a particular Array index.

ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized

获取一个值,该值指示对 ICollection<T> 的访问是否是同步的,即线程安全的。Gets a value that indicates whether access to the ICollection<T> is synchronized, that is thread-safe.

ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot

获取可用于同步对 ICollection<T> 的访问的对象。Gets an object that can be used to synchronize access to the ICollection<T>.

ICollection<Activity>.Add(Activity) ICollection<Activity>.Add(Activity) ICollection<Activity>.Add(Activity) ICollection<Activity>.Add(Activity)

将对象添加到位于 IList 末尾的 IListAdds an object to the IList at the end of the IList.

ICollection<Activity>.Clear() ICollection<Activity>.Clear() ICollection<Activity>.Clear() ICollection<Activity>.Clear()

IList 中清除所有活动。Clears all activities from the IList.

ICollection<Activity>.Contains(Activity) ICollection<Activity>.Contains(Activity) ICollection<Activity>.Contains(Activity) ICollection<Activity>.Contains(Activity)

获取一个值,该值指示 Object 是否是集合的成员。Gets a value that indicates whether the Object is a member of the collection.

ICollection<Activity>.CopyTo(Activity[], Int32) ICollection<Activity>.CopyTo(Activity[], Int32) ICollection<Activity>.CopyTo(Activity[], Int32) ICollection<Activity>.CopyTo(Activity[], Int32)

从特定的 ICollection 索引开始,将 Array 的元素复制到一个 Array 中。Copies the elements of the ICollection to an Array, starting at a particular Array index.

ICollection<Activity>.Count ICollection<Activity>.Count ICollection<Activity>.Count ICollection<Activity>.Count

获取 ICollection<T> 中包含的元素数。Gets the number of elements contained in the ICollection<T>.

ICollection<Activity>.IsReadOnly ICollection<Activity>.IsReadOnly ICollection<Activity>.IsReadOnly ICollection<Activity>.IsReadOnly

获取一个值,该值指示 IList 是否为只读。Gets a value that indicates whether the IList is read-only.

ICollection<Activity>.Remove(Activity) ICollection<Activity>.Remove(Activity) ICollection<Activity>.Remove(Activity) ICollection<Activity>.Remove(Activity)

ICollection<T> 中移除特定对象的第一个匹配项。Removes the first occurrence of a specific object from the ICollection<T>.

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

返回循环访问基础 IEnumeratorIListReturns an IEnumerator that iterates through the underlying IList.

IEnumerable<Activity>.GetEnumerator() IEnumerable<Activity>.GetEnumerator() IEnumerable<Activity>.GetEnumerator() IEnumerable<Activity>.GetEnumerator()

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

IEnumerable<T>.GetEnumerator() IEnumerable<T>.GetEnumerator() IEnumerable<T>.GetEnumerator() IEnumerable<T>.GetEnumerator()

返回循环访问集合的枚举数。Returns an enumerator that iterates through a collection.

(Inherited from List<T>)
IList.Add(Object) IList.Add(Object) IList.Add(Object) IList.Add(Object)

将对象添加到位于 IList 末尾的 IListAdds an object to the IList at the end of the IList.

IList.Clear() IList.Clear() IList.Clear() IList.Clear()

Activity 中移除所有 ICollectionRemoves all Activity from the ICollection.

IList.Contains(Object) IList.Contains(Object) IList.Contains(Object) IList.Contains(Object)

获取一个值,该值指示 Object 是否是集合的成员。Gets a value that indicates whether the Object is a member of the collection.

IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object)

获取基础活动集合中 Object 的从零开始的索引。Gets the zero-based index of the Object in the underlying activities collection.

IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object)

Object 中指定的从零开始的索引处插入 IListInserts an Object into the IList at the zero-based index specified.

IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize

获取一个值,该值指示 IList 是否具有固定大小。Gets a value indicating whether the IList has a fixed size.

IList.IsReadOnly IList.IsReadOnly IList.IsReadOnly IList.IsReadOnly

获取一个值,该值指示 ICollection<T> 是否为只读。Gets a value indicating whether the ICollection<T> is read-only.

IList.Item[Int32] IList.Item[Int32] IList.Item[Int32] IList.Item[Int32]

根据索引获取或设置 ICollection 中的活动。Gets or sets the activity in the ICollection based on the index.

IList.Remove(Object) IList.Remove(Object) IList.Remove(Object) IList.Remove(Object)

IList 中移除特定对象的第一个匹配项。Removes the first occurrence of a specific object from the IList.

IList<Activity>.IndexOf(Activity) IList<Activity>.IndexOf(Activity) IList<Activity>.IndexOf(Activity) IList<Activity>.IndexOf(Activity)

确定 IList 中特定项的索引。Determines the index of a specific item in the IList.

IList<Activity>.Insert(Int32, Activity) IList<Activity>.Insert(Int32, Activity) IList<Activity>.Insert(Int32, Activity) IList<Activity>.Insert(Int32, Activity)

Object 中指定的从零开始的索引处插入 IListInserts an Object into the IList at the zero-based index specified.

IList<Activity>.Item[Int32] IList<Activity>.Item[Int32] IList<Activity>.Item[Int32] IList<Activity>.Item[Int32]

获取或设置指定索引处的元素。Gets or sets the element at the specified index.

IList<Activity>.RemoveAt(Int32) IList<Activity>.RemoveAt(Int32) IList<Activity>.RemoveAt(Int32) IList<Activity>.RemoveAt(Int32)

移除位于指定索引处的 IList 项。Removes the IList item at the specified index.

扩展方法

CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) 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) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) 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) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) 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) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

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

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

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

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

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

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) 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) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) 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>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>)

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

Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) 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) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) 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>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) 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) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) 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>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) 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>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>)

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

Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>)

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

适用于