OperationCanceledException Sınıf

Tanım

İş parçacığının yürütüldüğü bir işlemin iptaline bağlı olarak bir iş parçacığında oluşturulan özel durum.The exception that is thrown in a thread upon cancellation of an operation that the thread was executing.

public ref class OperationCanceledException : Exception
public ref class OperationCanceledException : SystemException
public class OperationCanceledException : Exception
public class OperationCanceledException : SystemException
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public class OperationCanceledException : SystemException
type OperationCanceledException = class
    inherit Exception
type OperationCanceledException = class
    inherit SystemException
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type OperationCanceledException = class
    inherit SystemException
Public Class OperationCanceledException
Inherits Exception
Public Class OperationCanceledException
Inherits SystemException
Devralma
OperationCanceledException
Devralma
OperationCanceledException
Türetilmiş
Öznitelikler

Açıklamalar

İptal edilen görev ilişkili bir iptal belirteci içeriyorsa, özelliği tarafından döndürülür CancellationToken ve CancellationToken.IsCancellationRequested belirtecinin özelliği olarak ayarlanır true .If the task that was canceled had an associated cancellation token, it is returned by the CancellationToken property, and the CancellationToken.IsCancellationRequested property of the token is set to true.

Oluşturucular

OperationCanceledException()

OperationCanceledExceptionSistemin sağladığı bir hata iletisiyle sınıfının yeni bir örneğini başlatır.Initializes a new instance of the OperationCanceledException class with a system-supplied error message.

OperationCanceledException(CancellationToken)

OperationCanceledExceptionBir iptal belirteci ile sınıfın yeni bir örneğini başlatır.Initializes a new instance of the OperationCanceledException class with a cancellation token.

OperationCanceledException(SerializationInfo, StreamingContext)

OperationCanceledException sınıfının yeni bir örneğini serileştirilmiş verilerle başlatır.Initializes a new instance of the OperationCanceledException class with serialized data.

OperationCanceledException(String)

Belirtilen bir hata iletisiyle sınıfın yeni bir örneğini başlatır OperationCanceledException .Initializes a new instance of the OperationCanceledException class with a specified error message.

OperationCanceledException(String, CancellationToken)

OperationCanceledExceptionBelirtilen bir hata iletisiyle ve bir iptal belirteciyle sınıfın yeni bir örneğini başlatır.Initializes a new instance of the OperationCanceledException class with a specified error message and a cancellation token.

OperationCanceledException(String, Exception)

OperationCanceledExceptionBelirtilen bir hata iletisiyle sınıfın yeni bir örneğini ve bu özel durumun nedeni olan iç özel duruma bir başvuruyu başlatır.Initializes a new instance of the OperationCanceledException class with a specified error message and a reference to the inner exception that is the cause of this exception.

OperationCanceledException(String, Exception, CancellationToken)

OperationCanceledExceptionBelirtilen bir hata iletisiyle sınıfın yeni bir örneğini, bu özel durumun nedeni olan iç özel duruma bir başvuruyu ve bir iptal belirtecini başlatır.Initializes a new instance of the OperationCanceledException class with a specified error message, a reference to the inner exception that is the cause of this exception, and a cancellation token.

Özellikler

CancellationToken

İptal edilen işlemle ilişkili bir belirteç alır.Gets a token associated with the operation that was canceled.

Data

Özel durum hakkında ek kullanıcı tanımlı bilgiler sağlayan anahtar/değer çiftleri koleksiyonunu alır.Gets a collection of key/value pairs that provide additional user-defined information about the exception.

(Devralındığı yer: Exception)
HelpLink

Bu özel durumla ilişkili Yardım dosyasının bağlantısını alır veya ayarlar.Gets or sets a link to the help file associated with this exception.

(Devralındığı yer: Exception)
HResult

Belirli bir özel duruma atanan kodlanmış bir sayısal değer olan HRESULT 'yi alır veya ayarlar.Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception.

(Devralındığı yer: Exception)
InnerException

ExceptionGeçerli özel duruma neden olan örneği alır.Gets the Exception instance that caused the current exception.

(Devralındığı yer: Exception)
Message

Geçerli özel durumu açıklayan bir ileti alır.Gets a message that describes the current exception.

(Devralındığı yer: Exception)
Source

Uygulamanın veya hataya neden olan nesnenin adını alır veya ayarlar.Gets or sets the name of the application or the object that causes the error.

(Devralındığı yer: Exception)
StackTrace

Çağrı yığınında anlık çerçevelerin dize gösterimini alır.Gets a string representation of the immediate frames on the call stack.

(Devralındığı yer: Exception)
TargetSite

Geçerli özel durumu oluşturan yöntemi alır.Gets the method that throws the current exception.

(Devralındığı yer: Exception)

Yöntemler

Equals(Object)

Belirtilen nesnenin geçerli nesneye eşit olup olmadığını belirler.Determines whether the specified object is equal to the current object.

(Devralındığı yer: Object)
GetBaseException()

Türetilmiş bir sınıfta geçersiz kılınırsa, Exception bir veya daha fazla sonraki özel durumun kök nedeni olan öğesini döndürür.When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.

(Devralındığı yer: Exception)
GetHashCode()

Varsayılan karma işlevi olarak işlev görür.Serves as the default hash function.

(Devralındığı yer: Object)
GetObjectData(SerializationInfo, StreamingContext)

Türetilmiş bir sınıfta geçersiz kılınırsa, SerializationInfo özel durum hakkındaki bilgileri ayarlar.When overridden in a derived class, sets the SerializationInfo with information about the exception.

(Devralındığı yer: Exception)
GetType()

Geçerli örneğin çalışma zamanı türünü alır.Gets the runtime type of the current instance.

(Devralındığı yer: Exception)
MemberwiseClone()

Geçerli bir basit kopyasını oluşturur Object .Creates a shallow copy of the current Object.

(Devralındığı yer: Object)
ToString()

Geçerli özel durumun dize gösterimini oluşturur ve döndürür.Creates and returns a string representation of the current exception.

(Devralındığı yer: Exception)

Ekinlikler

SerializeObjectState

Özel durum hakkında serileştirilmiş veri içeren bir özel durum nesnesi oluşturmak için bir özel durum serileştirildiğinde gerçekleşir.Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception.

(Devralındığı yer: Exception)

Şunlara uygulanır

Ayrıca bkz.