O método CancellationToken.ThrowIfCancellationRequested do C# é usado para verificar se um token de cancelamento foi solicitado e, caso tenha sido, lança uma exceção OperationCanceledException. Isso é útil para interromper a execução de uma operação longa quando um pedido de cancelamento é recebido.
System.Threading CancellationToken.ThrowIfCancellationRequested em C# (CSharp) - 41 exemplos encontrados. Esses são os exemplos do mundo real mais bem avaliados de System.Threading.CancellationToken.ThrowIfCancellationRequested em C# (CSharp) extraídos de projetos de código aberto. Você pode avaliar os exemplos para nos ajudar a melhorar a qualidade deles.