InterruptionTokenSource
InterruptionTokenSource class
表示InterruptionToken的来源。
public class InterruptionTokenSource : IInterruptionTokenSource
构造函数
| 名称 | 描述 |
|---|---|
| InterruptionTokenSource() | 创建一个新的InterruptionTokenSource。 |
属性
| 名称 | 描述 |
|---|---|
| IsInterruptionRequested { get; } | 如果请求了中断,则返回true,否则返回false。 |
| Token { get; } | 返回绑定到此InterruptionTokenSource的新令牌。 |
方法
| 名称 | 描述 |
|---|---|
| Interrupt() | 初始化中断请求。 |