TaskCompletionSource.TrySetException Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
| Nom | Description |
|---|---|
| TrySetException(IEnumerable<Exception>) |
Tente de faire passer le sous-jacent Task à l’état Faulted . |
| TrySetException(Exception) |
Tente de faire passer le sous-jacent Task à l’état Faulted . |
TrySetException(IEnumerable<Exception>)
- Source:
- TaskCompletionSource.cs
- Source:
- TaskCompletionSource.cs
- Source:
- TaskCompletionSource.cs
- Source:
- TaskCompletionSource.cs
- Source:
- TaskCompletionSource.cs
public:
bool TrySetException(System::Collections::Generic::IEnumerable<Exception ^> ^ exceptions);
public bool TrySetException(System.Collections.Generic.IEnumerable<Exception> exceptions);
member this.TrySetException : seq<Exception> -> bool
Public Function TrySetException (exceptions As IEnumerable(Of Exception)) As Boolean
Paramètres
- exceptions
- IEnumerable<Exception>
Collection d’exceptions à lier à ce Task.
Retours
true si l’opération a réussi ; sinon, false.
Exceptions
exceptions a la valeur null.
Il existe un ou plusieurs null éléments dans exceptions.
La exceptions collection est vide.
Remarques
Cette opération retourne false si la Task valeur est déjà dans l’un des trois états finaux : RanToCompletion, ou .CanceledFaulted
S’applique à
TrySetException(Exception)
- Source:
- TaskCompletionSource.cs
- Source:
- TaskCompletionSource.cs
- Source:
- TaskCompletionSource.cs
- Source:
- TaskCompletionSource.cs
- Source:
- TaskCompletionSource.cs
public:
bool TrySetException(Exception ^ exception);
public bool TrySetException(Exception exception);
member this.TrySetException : Exception -> bool
Public Function TrySetException (exception As Exception) As Boolean
Paramètres
Retours
true si l’opération a réussi ; sinon, false.
Exceptions
exception a la valeur null.
Remarques
Cette opération retourne false si la Task valeur est déjà dans l’un des trois états finaux : RanToCompletion, ou .CanceledFaulted