ContractFailedEventArgs Class

.NET Framework (current version)
 

Provides methods and data for the Contract.ContractFailed event.

Namespace:   System.Diagnostics.Contracts
Assembly:  mscorlib (in mscorlib.dll)

System.Object
  System.EventArgs
    System.Diagnostics.Contracts.ContractFailedEventArgs

public sealed class ContractFailedEventArgs : EventArgs

NameDescription
System_CAPS_pubpropertyCondition

Gets the condition for the failure of the contract.

System_CAPS_pubpropertyFailureKind

Gets the type of contract that failed.

System_CAPS_pubpropertyHandled

Indicates whether the Contract.ContractFailed event has been handled.

System_CAPS_pubpropertyMessage

Gets the message that describes the Contract.ContractFailed event.

System_CAPS_pubpropertyOriginalException

Gets the original exception that caused the Contract.ContractFailed event.

System_CAPS_pubpropertyUnwind

Indicates whether the code contract escalation policy should be applied.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodSetHandled()

Sets the ContractFailedEventArgs.Handled property to true.

System_CAPS_pubmethodSetUnwind()

Sets the ContractFailedEventArgs.Unwind property to true.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

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.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: