TimerEventSubscriptionCollection TimerEventSubscriptionCollection TimerEventSubscriptionCollection TimerEventSubscriptionCollection Class

定义

警告

此 API 现已过时。

表示由 TimerEventSubscription 对象组成的有序列表。Represents an ordered list of TimerEventSubscription objects.

public ref class TimerEventSubscriptionCollection : System::Collections::ICollection
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
[System.Serializable]
public class TimerEventSubscriptionCollection : System.Collections.ICollection
type TimerEventSubscriptionCollection = class
    interface ICollection
    interface IEnumerable
Public Class TimerEventSubscriptionCollection
Implements ICollection
继承
TimerEventSubscriptionCollectionTimerEventSubscriptionCollectionTimerEventSubscriptionCollectionTimerEventSubscriptionCollection
属性
实现

注解

备注

本材料讨论的类型和命名空间已废弃不用。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.

一个 TimerEventSubscriptionCollection,表示与工作流实例关联的 TimerEventSubscription 对象的队列,并提供管理此队列的方法。A TimerEventSubscriptionCollection represents the queue of TimerEventSubscription objects associated with a workflow instance and provides methods to manage this queue. 订阅在队列中的排序方式基于其 ExpiresAt 值;具有较小 ExpiresAt 值的订阅将放置在具有较大 ExpiresAt 值的订阅的前面。Subscriptions are ordered in the queue based on their ExpiresAt values; those with smaller ExpiresAt values are positioned before those with larger ExpiresAt values. 您可以使用此类提供的方法,管理各个工作流实例的 TimerCollectionProperty 公开的活动计时器事件订阅的集合。You can use the methods provided by this class to manage the collection of active timer event subscriptions exposed by TimerCollectionProperty for each workflow instance. 您可以使用 AddRemove 添加或移除计时器队列中的订阅。You can use Add or Remove to add or remove subscriptions from the timer queue. 只要计时器队列中的第一个元素更改,就会调用 WorkflowSchedulerService 来取消先前位于队列开头的计时器事件,并计划新的计时器事件。Whenever the first element in the timer queue changes, the WorkflowSchedulerService is called to cancel the timer event that was previously at the beginning of the queue and schedule the new timer event.

字段

TimerCollectionProperty TimerCollectionProperty TimerCollectionProperty TimerCollectionProperty

与工作流实例关联的计时器队列。Timer queue associated with a workflow instance. 此队列包含组成工作流的按时间排序的 TimerEventSubscription 对象。This queue contains time ordered TimerEventSubscription objects for a workflow.

属性

Count Count Count Count

获取计时器队列中的 TimerEventSubscription 对象数。Gets the number of TimerEventSubscription objects in the timer queue.

IsSynchronized IsSynchronized IsSynchronized IsSynchronized

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

SyncRoot SyncRoot SyncRoot SyncRoot

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

方法

Add(TimerEventSubscription) Add(TimerEventSubscription) Add(TimerEventSubscription) Add(TimerEventSubscription)

TimerEventSubscription 添加到计时器队列。Adds a TimerEventSubscription to the timer queue.

CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32)

从指定数组索引开始将 TimerEventSubscriptionCollection 元素复制到现有一维 Array 中。Copies the TimerEventSubscriptionCollection elements to an existing one-dimensional Array, starting at the specified array index.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

返回循环访问 TimerEventSubscriptionCollection 的枚举数。Returns an enumerator that iterates through the TimerEventSubscriptionCollection.

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

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

(Inherited from Object)
GetType() GetType() GetType() GetType()

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

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

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

(Inherited from Object)
Peek() Peek() Peek() Peek()

返回位于计时器队列开始处的 TimerEventSubscription 但不将其移除。Returns the TimerEventSubscription at the beginning of the timer queue without removing it.

Remove(Guid) Remove(Guid) Remove(Guid) Remove(Guid)

从计时器队列中移除具有指定订阅 ID 的 TimerEventSubscriptionRemoves the TimerEventSubscription that has the specified subscription id from the timer queue.

Remove(TimerEventSubscription) Remove(TimerEventSubscription) Remove(TimerEventSubscription) Remove(TimerEventSubscription)

从计时器队列中移除 TimerEventSubscriptionRemoves the TimerEventSubscription from the timer queue.

ToString() ToString() ToString() ToString()

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

(Inherited from Object)

扩展方法

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.

适用于