ContractFailedEventArgs ContractFailedEventArgs ContractFailedEventArgs ContractFailedEventArgs Class

Definition

Provides methods and data for the ContractFailed event.

public ref class ContractFailedEventArgs sealed : EventArgs
public sealed class ContractFailedEventArgs : EventArgs
type ContractFailedEventArgs = class
    inherit EventArgs
Public NotInheritable Class ContractFailedEventArgs
Inherits EventArgs
Inheritance
ContractFailedEventArgsContractFailedEventArgsContractFailedEventArgsContractFailedEventArgs

Remarks

A ContractFailedEventArgs object is passed to the Contract.ContractFailed event when a contract fails. The ContractFailed event enables a managed application environment such as an interactive interpreter, a Web browser host, a test harness, or a logging infrastructure to be notified of contract failures. The event requires full trust.

Constructors

ContractFailedEventArgs(ContractFailureKind, String, String, Exception) ContractFailedEventArgs(ContractFailureKind, String, String, Exception) ContractFailedEventArgs(ContractFailureKind, String, String, Exception) ContractFailedEventArgs(ContractFailureKind, String, String, Exception)

Provides data for the ContractFailed event.

Properties

Condition Condition Condition Condition

Gets the condition for the failure of the contract.

FailureKind FailureKind FailureKind FailureKind

Gets the type of contract that failed.

Handled Handled Handled Handled

Indicates whether the ContractFailed event has been handled.

Message Message Message Message

Gets the message that describes the ContractFailed event.

OriginalException OriginalException OriginalException OriginalException

Gets the original exception that caused the ContractFailed event.

Unwind Unwind Unwind Unwind

Indicates whether the code contract escalation policy should be applied.

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
SetHandled() SetHandled() SetHandled() SetHandled()

Sets the Handled property to true.

SetUnwind() SetUnwind() SetUnwind() SetUnwind()

Sets the Unwind property to true.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to