AssertFilter.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / System / Diagnostics / AssertFilter.cs / 1 / AssertFilter.cs

                            // ==++== 
//
//   Copyright (c) Microsoft Corporation.  All rights reserved.
//
// ==--== 
namespace System.Diagnostics {
 
 
    using System;
   // A Filter is used to decide whether an assertt failure 
   // should terminate the program (or invoke the debugger).
   // Typically this is done by popping up a dialog & asking the user.
   //
   // The default filter brings up a simple Win32 dialog with 3 buttons. 

   [Serializable()] 
   abstract internal class AssertFilter 
    {
 
      // Called when an assertt fails.  This should be overridden with logic which
      // determines whether the program should terminate or not.  Typically this
      // is done by asking the user.
      // 

      abstract public AssertFilters  AssertFailure(String condition, String message, 
                          StackTrace location); 

    } 
    // No data, does not need to be marked with the serializable attribute
    internal class DefaultFilter : AssertFilter
    {
      internal DefaultFilter() 
      {
      } 
 
      public override AssertFilters  AssertFailure(String condition, String message,
                          StackTrace location) 

      {
         return (AssertFilters) Assert.ShowDefaultAssertDialog (condition, message);
      } 
    }
 
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.


                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK