CancellationToken.ThrowIfCancellationRequested Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Bu belirtecin iptali istendiyse bir OperationCanceledException oluşturur.
public:
void ThrowIfCancellationRequested();
public void ThrowIfCancellationRequested();
member this.ThrowIfCancellationRequested : unit -> unit
Public Sub ThrowIfCancellationRequested ()
Özel durumlar
Belirteçte iptal istendi.
Açıklamalar
Bu yöntem aşağıdakilere eşdeğer işlevsellik sağlar:
C#
if (token.IsCancellationRequested)
throw new OperationCanceledException(token);
If token.IsCancellationRequested Then
Throw New OperationCanceledException(token)
End If