Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Diagnostics / AssertFilter.cs / 1305376 / AssertFilter.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== 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. [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. // 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() { } [System.Security.SecuritySafeCritical] // auto-generated [ResourceExposure(ResourceScope.Process)] [ResourceConsumption(ResourceScope.Process)] public override AssertFilters AssertFailure(String condition, String message, StackTrace location) { return (AssertFilters) Assert.ShowDefaultAssertDialog (condition, message, location.ToString()); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== 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. [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. // 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() { } [System.Security.SecuritySafeCritical] // auto-generated [ResourceExposure(ResourceScope.Process)] [ResourceConsumption(ResourceScope.Process)] public override AssertFilters AssertFailure(String condition, String message, StackTrace location) { return (AssertFilters) Assert.ShowDefaultAssertDialog (condition, message, location.ToString()); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EdmItemCollection.cs
- Encoder.cs
- ProgressBar.cs
- DocobjHost.cs
- XmlCodeExporter.cs
- RegisteredDisposeScript.cs
- DataTrigger.cs
- ImportOptions.cs
- InkCanvasFeedbackAdorner.cs
- ExpressionBuilder.cs
- CachedFontFace.cs
- ToolboxBitmapAttribute.cs
- SqlCommandSet.cs
- Select.cs
- TypeInfo.cs
- InvalidComObjectException.cs
- VoiceSynthesis.cs
- SecurityContextKeyIdentifierClause.cs
- ListItemsPage.cs
- DatePicker.cs
- InvariantComparer.cs
- EdmValidator.cs
- XPathMessageFilterElement.cs
- DocumentPaginator.cs
- DataObjectAttribute.cs
- RadioButtonFlatAdapter.cs
- MimeObjectFactory.cs
- CodeNamespaceImport.cs
- Int32Storage.cs
- DragDeltaEventArgs.cs
- StrokeNodeOperations.cs
- GlobalProxySelection.cs
- ReadOnlyObservableCollection.cs
- QueueProcessor.cs
- TypeListConverter.cs
- XmlNavigatorFilter.cs
- GradientBrush.cs
- _CommandStream.cs
- DependencyPropertyKind.cs
- BatchWriter.cs
- NativeActivityTransactionContext.cs
- Matrix.cs
- _ListenerResponseStream.cs
- ObjectTag.cs
- DynamicObject.cs
- ArrayItemValue.cs
- CompositeControl.cs
- QueryOptionExpression.cs
- Descriptor.cs
- BooleanToVisibilityConverter.cs
- RSAPKCS1KeyExchangeFormatter.cs
- SelectionItemProviderWrapper.cs
- SrgsElementFactoryCompiler.cs
- OAVariantLib.cs
- ButtonBase.cs
- SpeakCompletedEventArgs.cs
- TextSelectionHighlightLayer.cs
- PhonemeConverter.cs
- AuthenticateEventArgs.cs
- InlinedAggregationOperatorEnumerator.cs
- WebFaultException.cs
- ChangesetResponse.cs
- TdsParser.cs
- SiteMapNode.cs
- ArglessEventHandlerProxy.cs
- Path.cs
- GeometryDrawing.cs
- NonceCache.cs
- Native.cs
- ResourceCodeDomSerializer.cs
- DesignerAttribute.cs
- PackageProperties.cs
- SafeWaitHandle.cs
- PersonalizationStateInfoCollection.cs
- SafeRightsManagementQueryHandle.cs
- JobPageOrder.cs
- WmfPlaceableFileHeader.cs
- Variant.cs
- DbTypeMap.cs
- DataGridColumnDropSeparator.cs
- DataColumnCollection.cs
- RowParagraph.cs
- Assembly.cs
- UndoEngine.cs
- COM2PictureConverter.cs
- WebHttpDispatchOperationSelector.cs
- FlowStep.cs
- BrushConverter.cs
- AuthorizationRule.cs
- StandardCommands.cs
- HMACRIPEMD160.cs
- DataSourceBooleanViewSchemaConverter.cs
- LayoutEngine.cs
- PerfProviderCollection.cs
- DecimalAverageAggregationOperator.cs
- AdRotatorDesigner.cs
- Events.cs
- EventLogEntry.cs
- MobileControlBuilder.cs
- Directory.cs