diff options
Diffstat (limited to 'src/mscorlib/src/System/Diagnostics/AssertFilter.cs')
-rw-r--r-- | src/mscorlib/src/System/Diagnostics/AssertFilter.cs | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/src/mscorlib/src/System/Diagnostics/AssertFilter.cs b/src/mscorlib/src/System/Diagnostics/AssertFilter.cs index ab60ee4cff..7c861de58e 100644 --- a/src/mscorlib/src/System/Diagnostics/AssertFilter.cs +++ b/src/mscorlib/src/System/Diagnostics/AssertFilter.cs @@ -2,29 +2,29 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace System.Diagnostics { - - - using System; - using System.Runtime.Versioning; - // A Filter is used to decide whether an assert 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. - + + +using System; +using System.Runtime.Versioning; + +namespace System.Diagnostics +{ + // A Filter is used to decide whether an assert 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 assert fails. This should be overridden with logic which // determines whether the program should terminate or not. Typically this // is done by asking the user. // // The windowTitle can be null. - abstract public AssertFilters AssertFailure(String condition, String message, + abstract public AssertFilters AssertFailure(String condition, String message, StackTrace location, StackTrace.TraceFormat stackTraceFormat, String windowTitle); - } // No data, does not need to be marked with the serializable attribute internal class DefaultFilter : AssertFilter @@ -32,14 +32,13 @@ namespace System.Diagnostics { internal DefaultFilter() { } - - public override AssertFilters AssertFailure(String condition, String message, + + public override AssertFilters AssertFailure(String condition, String message, StackTrace location, StackTrace.TraceFormat stackTraceFormat, String windowTitle) - + { - return (AssertFilters) Assert.ShowDefaultAssertDialog (condition, message, location.ToString(stackTraceFormat), windowTitle); + return (AssertFilters)Assert.ShowDefaultAssertDialog(condition, message, location.ToString(stackTraceFormat), windowTitle); } } - } |