public class AsyncAutoResetEventPublic Class AsyncAutoResetEventtype AsyncAutoResetEvent = class end与传统的AutoResetEvent不同,此类不会阻塞线程,而是返回可等待的Task, 更适合在异步编程模式中使用,能够避免线程阻塞并提高系统的并发性能。 此代码摘抄自微软VS相关库。
| AsyncAutoResetEvent | 初始化AsyncAutoResetEvent类的新实例,默认不允许内联等待者。 |
| AsyncAutoResetEvent(Boolean) | 初始化AsyncAutoResetEvent类的新实例。 |
| Equals | Determines whether the specified object is equal to the current object. (继承自 Object。) |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (继承自 Object。) |
| GetHashCode | Serves as the default hash function. (继承自 Object。) |
| GetType | Gets the Type of the current instance. (继承自 Object。) |
| MemberwiseClone | Creates a shallow copy of the current Object. (继承自 Object。) |
| Set | 解除阻塞一个等待者,或者如果没有等待者则设置信号,使下一个等待者可以立即继续执行。 |
| SetAll | 解除阻塞所有当前等待的等待者。 |
| ToString | Returns a string that represents the current object. (继承自 Object。) |
| WaitOneAsync | 返回一个可等待对象,用于异步获取下一个信号。 |
| WaitOneAsync(CancellationToken) | 返回一个可等待对象,用于异步获取下一个信号,并支持取消操作。 |
| WaitOneAsync(TimeSpan) | 返回一个可等待对象,用于异步获取下一个信号,并支持超时。 |
| Map |
将源对象的属性映射到目标对象的属性中。
(由 Mapper 定义。) |
| Map |
将源对象映射到目标类型的实例。
(由 Mapper 定义。) |
| MapTTarget |
将源对象映射到指定目标类型的新实例。
(由 Mapper 定义。) |
| ToJsonString |
转换为Json
(由 SerializeConvert 定义。) |