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
- OutputCacheSettingsSection.cs
- Preprocessor.cs
- assertwrapper.cs
- NavigationCommands.cs
- DoubleCollectionConverter.cs
- StringInfo.cs
- PropertyFilterAttribute.cs
- CodeTypeReferenceSerializer.cs
- GridViewDeletedEventArgs.cs
- ContentType.cs
- XmlAttributeCollection.cs
- Rotation3D.cs
- DocumentOrderQuery.cs
- ElapsedEventArgs.cs
- TableItemProviderWrapper.cs
- EntityDesignPluralizationHandler.cs
- DataGridViewCell.cs
- HttpContext.cs
- ValueQuery.cs
- FirstMatchCodeGroup.cs
- InvalidWMPVersionException.cs
- DataGridViewDataConnection.cs
- SignedXml.cs
- Timeline.cs
- ToolStripArrowRenderEventArgs.cs
- SafeFileMapViewHandle.cs
- OutputCacheProfile.cs
- ProjectionCamera.cs
- HTMLTagNameToTypeMapper.cs
- PerformanceCounterPermissionAttribute.cs
- StructuralComparisons.cs
- JavaScriptSerializer.cs
- HttpWrapper.cs
- NonVisualControlAttribute.cs
- wgx_exports.cs
- StoryFragments.cs
- TypeReference.cs
- BitmapData.cs
- UMPAttributes.cs
- ExpressionBuilder.cs
- BuildResultCache.cs
- TransformPatternIdentifiers.cs
- ToolZone.cs
- WebPartConnectionsCancelEventArgs.cs
- ApplicationContext.cs
- ControlAdapter.cs
- DesignerSerializerAttribute.cs
- PenContext.cs
- ellipse.cs
- IntranetCredentialPolicy.cs
- FixedStringLookup.cs
- EventBookmark.cs
- SamlAuthenticationStatement.cs
- BasicBrowserDialog.designer.cs
- TypeSource.cs
- WindowPattern.cs
- ConversionValidationRule.cs
- TreeNodeCollectionEditor.cs
- XPathParser.cs
- CommandDevice.cs
- TrackingProfileCache.cs
- ToolZone.cs
- GcSettings.cs
- ConfigurationElementCollection.cs
- BorderGapMaskConverter.cs
- MatrixAnimationUsingPath.cs
- CharEntityEncoderFallback.cs
- Win32Exception.cs
- KnownBoxes.cs
- Schema.cs
- CodeArrayIndexerExpression.cs
- CheckedPointers.cs
- Effect.cs
- ReadOnlyHierarchicalDataSourceView.cs
- CheckBoxList.cs
- ChangeConflicts.cs
- SharedDp.cs
- PreviewPageInfo.cs
- RenderTargetBitmap.cs
- UpdateTracker.cs
- WebPartVerbCollection.cs
- DataGridViewCellMouseEventArgs.cs
- UseAttributeSetsAction.cs
- AssemblyCache.cs
- WindowProviderWrapper.cs
- ToolstripProfessionalRenderer.cs
- MediaEntryAttribute.cs
- Light.cs
- XmlRawWriter.cs
- CookielessHelper.cs
- WrappedReader.cs
- EntitySetBase.cs
- SqlNamer.cs
- NavigationService.cs
- WebPartDisplayModeEventArgs.cs
- WebScriptEnablingElement.cs
- QilSortKey.cs
- BaseAppDomainProtocolHandler.cs
- BuildManager.cs
- SmtpAuthenticationManager.cs