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
- ValueExpressions.cs
- KeyEvent.cs
- WebServiceHostFactory.cs
- AnnotationComponentManager.cs
- _CookieModule.cs
- SudsWriter.cs
- CachedTypeface.cs
- OutputCacheSettingsSection.cs
- ObjectDataSourceMethodEventArgs.cs
- FocusTracker.cs
- ReadContentAsBinaryHelper.cs
- DataRecordInternal.cs
- CompoundFileReference.cs
- GraphicsState.cs
- DummyDataSource.cs
- UnauthorizedWebPart.cs
- ColumnWidthChangedEvent.cs
- BuildManager.cs
- RetrieveVirtualItemEventArgs.cs
- VideoDrawing.cs
- MatcherBuilder.cs
- AssertFilter.cs
- RowType.cs
- ValidationSummary.cs
- TagPrefixInfo.cs
- IDReferencePropertyAttribute.cs
- UserPreference.cs
- ParameterReplacerVisitor.cs
- BitSet.cs
- HandlerBase.cs
- MimeBasePart.cs
- SimpleModelProvider.cs
- MetabaseServerConfig.cs
- DataGridBeginningEditEventArgs.cs
- MatrixTransform3D.cs
- ModifierKeysValueSerializer.cs
- wmiprovider.cs
- LabelExpression.cs
- Int16Storage.cs
- SourceFilter.cs
- DSASignatureFormatter.cs
- XmlMemberMapping.cs
- AxisAngleRotation3D.cs
- DelegateSerializationHolder.cs
- XMLSchema.cs
- ContainerCodeDomSerializer.cs
- PtsCache.cs
- UIElement.cs
- Point3D.cs
- ListDataBindEventArgs.cs
- HTTPNotFoundHandler.cs
- ModuleBuilderData.cs
- HitTestResult.cs
- NoClickablePointException.cs
- AvTrace.cs
- HostSecurityManager.cs
- WCFBuildProvider.cs
- ProjectionCamera.cs
- Effect.cs
- PictureBox.cs
- HasCopySemanticsAttribute.cs
- CapabilitiesPattern.cs
- SqlWriter.cs
- UserControl.cs
- MasterPageParser.cs
- TextCompositionEventArgs.cs
- IdentifierCollection.cs
- ReturnValue.cs
- SelectedDatesCollection.cs
- FragmentQueryProcessor.cs
- DeclaredTypeValidator.cs
- GeneralTransform3DCollection.cs
- HTMLTagNameToTypeMapper.cs
- UInt16Storage.cs
- BindingManagerDataErrorEventArgs.cs
- ListManagerBindingsCollection.cs
- VisemeEventArgs.cs
- PieceNameHelper.cs
- WebMessageEncoderFactory.cs
- XslUrlEditor.cs
- ThicknessAnimationUsingKeyFrames.cs
- ErrorCodes.cs
- SimpleBitVector32.cs
- GridViewUpdateEventArgs.cs
- HtmlImage.cs
- CompatibleComparer.cs
- SystemIPInterfaceStatistics.cs
- Lasso.cs
- RegexParser.cs
- DrawListViewColumnHeaderEventArgs.cs
- COSERVERINFO.cs
- IndexExpression.cs
- SafeNativeMethods.cs
- XmlQueryContext.cs
- CompoundFileStorageReference.cs
- ProtocolsSection.cs
- StatusBarDrawItemEvent.cs
- QueuedDeliveryRequirementsMode.cs
- MessageQueuePermission.cs
- ListViewGroupConverter.cs