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
- AsymmetricKeyExchangeDeformatter.cs
- SystemThemeKey.cs
- Stack.cs
- DATA_BLOB.cs
- UnaryExpressionHelper.cs
- SharedStatics.cs
- ToolboxComponentsCreatingEventArgs.cs
- DesignBinding.cs
- TransactionCache.cs
- ErrorWebPart.cs
- ThreadInterruptedException.cs
- SecurityContextTokenValidationException.cs
- ZipIOCentralDirectoryBlock.cs
- IconHelper.cs
- Bits.cs
- CodeNamespaceCollection.cs
- DoubleLinkListEnumerator.cs
- DataGridViewCellStyleConverter.cs
- ProgressBarRenderer.cs
- CollectionContainer.cs
- DesignTimeTemplateParser.cs
- MarshalByRefObject.cs
- Wrapper.cs
- CodeValidator.cs
- WindowsGraphicsCacheManager.cs
- SchemaNamespaceManager.cs
- Span.cs
- XmlCharCheckingReader.cs
- AppDomainInstanceProvider.cs
- DiagnosticEventProvider.cs
- WebConfigurationHost.cs
- XmlDocumentType.cs
- WinHttpWebProxyFinder.cs
- AliasExpr.cs
- PublishLicense.cs
- FixedLineResult.cs
- AVElementHelper.cs
- BitmapFrameEncode.cs
- PhonemeEventArgs.cs
- HierarchicalDataBoundControl.cs
- DESCryptoServiceProvider.cs
- AutoResetEvent.cs
- DocumentXPathNavigator.cs
- StagingAreaInputItem.cs
- Light.cs
- CodeVariableDeclarationStatement.cs
- DataGridViewDataErrorEventArgs.cs
- UndirectedGraph.cs
- DefaultEvaluationContext.cs
- ListViewGroupItemCollection.cs
- TimeManager.cs
- DeflateEmulationStream.cs
- Identity.cs
- PageBorderless.cs
- ServiceDescriptionContext.cs
- InfoCardAsymmetricCrypto.cs
- MessageQueueTransaction.cs
- SoapHeaderException.cs
- SqlFlattener.cs
- CodeAttributeDeclarationCollection.cs
- DelegateHelpers.cs
- ItemAutomationPeer.cs
- OleDbRowUpdatedEvent.cs
- OutputCacheSettings.cs
- SettingsSavedEventArgs.cs
- ProbeMatches11.cs
- QilFactory.cs
- Int32CollectionValueSerializer.cs
- AutomationAttributeInfo.cs
- VarRemapper.cs
- CancellationTokenRegistration.cs
- DataTableExtensions.cs
- PropertyRecord.cs
- Compiler.cs
- EdmError.cs
- SortQueryOperator.cs
- Authorization.cs
- PerformanceCounter.cs
- XmlNamespaceMappingCollection.cs
- NumberFormatInfo.cs
- Stroke.cs
- HostVisual.cs
- DataConnectionHelper.cs
- ClientApiGenerator.cs
- InProcStateClientManager.cs
- FormViewPageEventArgs.cs
- MarginCollapsingState.cs
- COM2Properties.cs
- Scalars.cs
- WebPartConnectionsConfigureVerb.cs
- JournalEntry.cs
- MethodCallConverter.cs
- FixedStringLookup.cs
- CustomErrorCollection.cs
- ProviderCollection.cs
- SByte.cs
- ZipIOLocalFileHeader.cs
- FilterFactory.cs
- TypeDefinition.cs
- Constraint.cs