ContractFailedEventArgs Class
Provides methods and data for the Contract.ContractFailed event.
Assembly: mscorlib (in mscorlib.dll)
| Name | Description | |
|---|---|---|
![]() | ContractFailedEventArgs(ContractFailureKind, String, String, Exception) | Provides data for the Contract.ContractFailed event. |
| Name | Description | |
|---|---|---|
![]() | Condition | Gets the condition for the failure of the contract. |
![]() | FailureKind | Gets the type of contract that failed. |
![]() | Handled | Indicates whether the Contract.ContractFailed event has been handled. |
![]() | Message | Gets the message that describes the Contract.ContractFailed event. |
![]() | OriginalException | Gets the original exception that caused the Contract.ContractFailed event. |
![]() | Unwind | Indicates whether the code contract escalation policy should be applied. |
| Name | Description | |
|---|---|---|
![]() | 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() | |
![]() | SetHandled() | Sets the ContractFailedEventArgs.Handled property to true. |
![]() | SetUnwind() | Sets the ContractFailedEventArgs.Unwind property to true. |
![]() | ToString() | 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.
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.

