CancellationToken.ThrowIfCancellationRequested Metódus
Definíció
Fontos
Egyes információk olyan, kiadás előtti termékekre vonatkoznak, amelyek a kiadásig még jelentősen módosulhatnak. A Microsoft nem vállal kifejezett vagy törvényi garanciát az itt megjelenő információért.
A rendszer a OperationCanceledException jogkivonat lemondását kéri.
public:
void ThrowIfCancellationRequested();
public void ThrowIfCancellationRequested();
member this.ThrowIfCancellationRequested : unit -> unit
Public Sub ThrowIfCancellationRequested ()
Kivételek
A jogkivonat lemondását kérték.
Megjegyzések
Ez a módszer a következő funkciókkal egyenértékű funkciókat biztosít:
C#
if (token.IsCancellationRequested)
throw new OperationCanceledException(token);
If token.IsCancellationRequested Then
Throw New OperationCanceledException(token)
End If