TaskCompletionSource.SetException Metod

Definition

Överlagringar

Name Description
SetException(IEnumerable<Exception>)

Överför den underliggande till Task tillståndet Faulted .

SetException(Exception)

Överför den underliggande till Task tillståndet Faulted .

SetException(IEnumerable<Exception>)

Källa:
TaskCompletionSource.cs
Källa:
TaskCompletionSource.cs
Källa:
TaskCompletionSource.cs
Källa:
TaskCompletionSource.cs
Källa:
TaskCompletionSource.cs

Överför den underliggande till Task tillståndet Faulted .

public:
 void SetException(System::Collections::Generic::IEnumerable<Exception ^> ^ exceptions);
public void SetException(System.Collections.Generic.IEnumerable<Exception> exceptions);
member this.SetException : seq<Exception> -> unit
Public Sub SetException (exceptions As IEnumerable(Of Exception))

Parametrar

exceptions
IEnumerable<Exception>

Samlingen med undantag som ska bindas till den här Task.

Undantag

exceptions är null.

Det finns ett eller flera null element i exceptions.

Den underliggande Task är redan i något av de tre sista tillstånden: RanToCompletion, Faultedeller Canceled.

Gäller för

SetException(Exception)

Källa:
TaskCompletionSource.cs
Källa:
TaskCompletionSource.cs
Källa:
TaskCompletionSource.cs
Källa:
TaskCompletionSource.cs
Källa:
TaskCompletionSource.cs

Överför den underliggande till Task tillståndet Faulted .

public:
 void SetException(Exception ^ exception);
public void SetException(Exception exception);
member this.SetException : Exception -> unit
Public Sub SetException (exception As Exception)

Parametrar

exception
Exception

Undantaget för att binda till den här Task.

Undantag

exception är null.

Den underliggande Task är redan i något av de tre sista tillstånden: RanToCompletion, Faultedeller Canceled.

Gäller för