SignalNotifier Class
在事件或信号量发出信号时运行方法。还可以指定超时值,使委托在命名事件未发生(或者信号量未达到终止状态),但已超过时间范围时运行。
注意 桌面和 Windows 应用商店应用程序均支持 ThreadPool API。
语法
特性
- [MarshalingBehavior(Agile)]
- [Threading(Both)]
- [Version(0x06020000)]
- [WebHostHidden()]
成员
SignalNotifier类 具有这些类型的成员:
方法
The SignalNotifier 类 具有这些方法。 它还继承方法于Object 类.
方法 | 说明 |
---|---|
AttachToEvent(String, SignalHandler) | Attaches a SignalHandler delegate to an event. The delegated method will run the next time the event occurs. |
AttachToEvent(String, SignalHandler, TimeSpan) | Attaches a SignalHandler delegate to an event. The delegated method will run if the event occurs or the time span elapses, whichever comes first. |
AttachToSemaphore(String, SignalHandler) | Attaches a SignalHandler delegate to a named semaphore. The delegated method will run when the named semaphore is signaled. |
AttachToSemaphore(String, SignalHandler, TimeSpan) | Attaches a SignalHandler delegate to a named semaphore and specifies a timeout value. The delegated method will run when the named semaphore is signaled, or if the time span elapses before the semaphore reaches a signaled state. |
Enable | Submits the SignalNotifier to the thread pool. |
Terminate | Terminates the SignalNotifier if it has not already started running. |
要求
最低支持客户端 | Windows 8 [仅 Windows 应用商店应用程序] |
---|---|
最低支持服务器 | Windows Server 2012 [仅 Windows 应用商店应用程序] |
最低支持电话 | Windows Phone 8 |
命名空间 |
|
元数据 |
|
另请参见
显示: