Aracılığıyla paylaş


TaskCompletionSource.SetException Yöntem

Tanım

Aşırı Yüklemeler

SetException(IEnumerable<Exception>)

Temel alınan Task öğesini duruma geçirmektedir Faulted .

SetException(Exception)

Temel alınan Task öğesini duruma geçirmektedir Faulted .

SetException(IEnumerable<Exception>)

Temel alınan Task öğesini duruma geçirmektedir 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))

Parametreler

exceptions
IEnumerable<Exception>

Bu Tasköğesine bağlanacak özel durumların koleksiyonu.

Özel durumlar

exceptions, null değeridir.

içinde exceptionsbir veya daha fazla null öğe vardır.

Temel alınan Task zaten üç son durumdan birindedir: RanToCompletion, Faultedveya Canceled.

Şunlara uygulanır

SetException(Exception)

Temel alınan Task öğesini duruma geçirmektedir Faulted .

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

Parametreler

exception
Exception

Bu Tasköğesine bağlanmak için özel durum.

Özel durumlar

exception, null değeridir.

Temel alınan Task zaten üç son durumdan birindedir: RanToCompletion, Faultedveya Canceled.

Şunlara uygulanır