Bewerken

Share via


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
ContractFailedEventArgs

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)

Provides data for the ContractFailed event.

Properties

Condition

Gets the condition for the failure of the contract.

FailureKind

Gets the type of contract that failed.

Handled

Indicates whether the ContractFailed event has been handled.

Message

Gets the message that describes the ContractFailed event.

OriginalException

Gets the original exception that caused the ContractFailed event.

Unwind

Indicates whether the code contract escalation policy should be applied.

Methods

Equals(Object)

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

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
SetHandled()

Sets the Handled property to true.

SetUnwind()

Sets the Unwind property to true.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to