mscorlib 4.0.0.0 System.EventArgs

A object is passed to the event when a contract fails. The 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.

Provides methods and data for the event.

- Constructor
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)

  Provides data for the event.

  One of the enumeration values that specifies the contract that failed.
  The message for the event.
  The condition for the event.
  The exception that caused the event.
- Property
  4.0.0.0
  System.String The condition that caused the contract failure.

  Gets the condition for the failure of the contract.

- Property
  4.0.0.0
  System.Diagnostics.Contracts.ContractFailureKind The kind of contract failure.

  Gets the type of contract that failed.

- Property
  4.0.0.0
  System.Boolean Whether the contract failure has been handled.

  If the event has not been handled, the debugger is notified. If no debugger is attached, an Assert dialog box is displayed.

  Indicates whether the event has been handled.

- Property
  4.0.0.0
  System.String The message associated with this contract failure.

  Gets the message that describes the event.

- Property
  4.0.0.0
  System.Exception The original exception that caused this contract failure, if any.

  Gets the original exception that caused the event.

- Method
  4.0.0.0
  System.Void

  The method provides a way for the runtime analysis checker to indicate that a contract exception has been handled. See the property for more information.

  Sets the property to true.

- Method
  4.0.0.0
  System.Void

  The method provides a way to indicate that the escalation policy for the code contract should be applied. See the property for more information.

  Sets the property to true.

- Property
  4.0.0.0
  System.Boolean Whether the contract failure should unwind the stack.

  If the return value is true, the escalation policy is to notify the attached debugger about a contract failure or to display an Assert dialog box if a debugger is not attached.

  This value should be set to false for analysis tools that run on a server (for example, ASP.NET).

  Indicates whether the code contract escalation policy should be applied.