private void HandleContractFailed(object sender, ContractFailedEventArgs args)
 {
     if (DesignerProperties.GetIsInDesignMode(this))
     {
         args.SetHandled();
     }
 }
Example #2
0
 private void OnContractFailed(object sender, ContractFailedEventArgs e)
 {
     this.logger.Fatal("Contract failed : {0}", e.Condition);
     if (e.OriginalException != null)
     {
         this.HandleCrashException(e.OriginalException);
     }
     else
     {
         this.logger.Fatal(string.Format(" Stack Trace:\r\n{0}", Environment.StackTrace));
     }
     e.SetHandled();
 }
 static void HandleFailure(object sender, ContractFailedEventArgs args)
 {
     Console.WriteLine("{0}: {1} {2}", args.FailureKind,
                       args.Condition, args.Message);
     args.SetHandled();
 }
Example #4
0
 private static void Contract_ContractFailed(object sender, ContractFailedEventArgs e)
 {
     e.SetHandled();
     // Assert.Fail("{0}: {1} {2}", e.FailureKind, e.Message, e.Condition);
 }
Example #5
0
 static void Contract_ContractFailed(object sender, ContractFailedEventArgs e)
 {
     Console.WriteLine("No se pudo asumir algo: " + e.Condition);
     e.SetHandled( );
     Console.ReadKey( );
 }