CancellationToken.ThrowIfCancellationRequested 方法    
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
如果已请求取消此标记,则引发 OperationCanceledException。
public:
 void ThrowIfCancellationRequested();public void ThrowIfCancellationRequested();member this.ThrowIfCancellationRequested : unit -> unitPublic Sub ThrowIfCancellationRequested ()例外
已请求取消此标记。
注解
此方法提供的功能等效于:
C#
if (token.IsCancellationRequested)   
    throw new OperationCanceledException(token);  
If token.IsCancellationRequested Then  
    Throw New OperationCanceledException(token)  
End If