Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ResourceDescriptionAttribute.cs
- Parser.cs
- EventProviderWriter.cs
- ObjectItemLoadingSessionData.cs
- BooleanFunctions.cs
- IgnoreFlushAndCloseStream.cs
- SwitchElementsCollection.cs
- CaseInsensitiveComparer.cs
- List.cs
- BackStopAuthenticationModule.cs
- CompositeDesignerAccessibleObject.cs
- SmtpDigestAuthenticationModule.cs
- IIS7UserPrincipal.cs
- ConfigXmlComment.cs
- AlternateView.cs
- ContractSearchPattern.cs
- MatrixAnimationUsingPath.cs
- DynamicRenderer.cs
- FunctionNode.cs
- SHA1Managed.cs
- BaseParser.cs
- Int32Collection.cs
- _NestedSingleAsyncResult.cs
- SystemBrushes.cs
- XmlSchemaSimpleContent.cs
- DivideByZeroException.cs
- connectionpool.cs
- PackageRelationship.cs
- RadioButtonList.cs
- ApplicationBuildProvider.cs
- ContractMapping.cs
- RootBrowserWindowProxy.cs
- PageParserFilter.cs
- ColumnResizeUndoUnit.cs
- FileFormatException.cs
- ClientTarget.cs
- StatusBarPanelClickEvent.cs
- EventEntry.cs
- DoubleMinMaxAggregationOperator.cs
- SqlCaseSimplifier.cs
- SqlCrossApplyToCrossJoin.cs
- UIElement.cs
- XmlSerializerImportOptions.cs
- PrimitiveDataContract.cs
- WinFormsSecurity.cs
- PointCollection.cs
- baseaxisquery.cs
- ILGenerator.cs
- SystemInformation.cs
- DictionaryItemsCollection.cs
- GridViewCancelEditEventArgs.cs
- PolicyManager.cs
- RadialGradientBrush.cs
- ListViewInsertionMark.cs
- RoleServiceManager.cs
- UseAttributeSetsAction.cs
- SqlGatherProducedAliases.cs
- Point3DCollectionConverter.cs
- SmtpException.cs
- EventProperty.cs
- Image.cs
- CalendarDesigner.cs
- __Filters.cs
- RegionData.cs
- XmlObjectSerializerReadContextComplex.cs
- EqualityComparer.cs
- XmlAnyElementAttributes.cs
- TreeNodeBindingCollection.cs
- FamilyTypefaceCollection.cs
- UpdateManifestForBrowserApplication.cs
- RequestQueue.cs
- WebPartCloseVerb.cs
- DbUpdateCommandTree.cs
- AxHost.cs
- ValidationPropertyAttribute.cs
- XsltLibrary.cs
- WebServiceTypeData.cs
- ItemContainerPattern.cs
- SmtpFailedRecipientsException.cs
- DataGridViewRowConverter.cs
- WCFServiceClientProxyGenerator.cs
- MsmqAuthenticationMode.cs
- UnsafeNativeMethods.cs
- WindowsRegion.cs
- RequestTimeoutManager.cs
- PagedDataSource.cs
- NullRuntimeConfig.cs
- ResourceDefaultValueAttribute.cs
- DetailsViewCommandEventArgs.cs
- TextEmbeddedObject.cs
- XmlSchemaAnnotation.cs
- MarshalByValueComponent.cs
- Parameter.cs
- JsonQueryStringConverter.cs
- OracleRowUpdatedEventArgs.cs
- DataServiceContext.cs
- DbConnectionInternal.cs
- Font.cs
- ParseChildrenAsPropertiesAttribute.cs
- StyleSheetRefUrlEditor.cs