Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.WorkflowServices / System / ServiceModel / Dispatcher / ServiceErrorHandler.cs / 1305376 / ServiceErrorHandler.cs
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------
namespace System.ServiceModel.Dispatcher
{
using System;
using System.ServiceModel.Channels;
using System.Collections;
class ServiceErrorHandler : DurableErrorHandler
{
const string dataKey = "System.ServiceModel.Dispatcher.ServiceErrorHandler.MarkExeption";
public ServiceErrorHandler(bool debug)
: base(debug)
{
}
public static void MarkException(Exception toMark)
{
// From MSDN: The OutOfMemoryException, StackOverflowException and ThreadAbortException
// classes always return a null reference for the value of the Data property.
// These are fatal exceptions and therefore we don't care that we can't mark them.
IDictionary data = toMark.Data;
if (data != null && !data.IsReadOnly && !data.IsFixedSize)
{
data.Add(dataKey, true);
}
}
protected override bool IsUserCodeException(Exception error)
{
IDictionary data = error.Data;
if (data != null && data.Contains(dataKey))
{
return true;
}
return false;
}
}
}
// 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
- CategoryNameCollection.cs
- XmlMapping.cs
- MessageDecoder.cs
- HttpResponseHeader.cs
- Automation.cs
- WebPartMenuStyle.cs
- HiddenFieldPageStatePersister.cs
- TrustLevelCollection.cs
- AuthorizationRule.cs
- IncrementalCompileAnalyzer.cs
- JpegBitmapDecoder.cs
- WinOEToolBoxItem.cs
- ReflectionPermission.cs
- TextViewBase.cs
- validationstate.cs
- BindingParameterCollection.cs
- SqlDataSourceCache.cs
- StructuralType.cs
- EnumValAlphaComparer.cs
- CorrelationService.cs
- InternalDuplexChannelFactory.cs
- ValueType.cs
- HybridObjectCache.cs
- SqlTypeConverter.cs
- DoubleCollectionValueSerializer.cs
- BrowserDefinitionCollection.cs
- FixedSOMGroup.cs
- ServicePointManagerElement.cs
- RegisteredExpandoAttribute.cs
- DoubleAnimationUsingPath.cs
- FromReply.cs
- LassoHelper.cs
- SafeNativeMethodsOther.cs
- ExtensionsSection.cs
- WebPartManagerInternals.cs
- DefaultClaimSet.cs
- App.cs
- LinqDataSourceContextData.cs
- AliasGenerator.cs
- TdsEnums.cs
- DataGridTable.cs
- ButtonField.cs
- WebEncodingValidator.cs
- TimeSpanStorage.cs
- PackWebRequest.cs
- SimpleParser.cs
- ResourceContainer.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- EnumerableRowCollectionExtensions.cs
- SizeF.cs
- RelationshipWrapper.cs
- NetworkInformationPermission.cs
- CommandField.cs
- BuildProvider.cs
- cookiecontainer.cs
- UnwrappedTypesXmlSerializerManager.cs
- ByteFacetDescriptionElement.cs
- WebPartCollection.cs
- ToolStripSystemRenderer.cs
- SchemaElementLookUpTable.cs
- AxWrapperGen.cs
- AuthenticatingEventArgs.cs
- ListItemConverter.cs
- DurableMessageDispatchInspector.cs
- XmlQualifiedName.cs
- CharacterBufferReference.cs
- ApplicationTrust.cs
- MenuAdapter.cs
- StringConverter.cs
- EventSinkHelperWriter.cs
- NumberFunctions.cs
- ContentFileHelper.cs
- ServiceBusyException.cs
- TypeBrowser.xaml.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- DocobjHost.cs
- UTF7Encoding.cs
- SqlRetyper.cs
- PropertyEntry.cs
- Parallel.cs
- PublisherMembershipCondition.cs
- QilTernary.cs
- Point3DCollectionValueSerializer.cs
- controlskin.cs
- XamlParser.cs
- SystemParameters.cs
- XmlDownloadManager.cs
- SetterBaseCollection.cs
- ScrollBar.cs
- Part.cs
- CodeValidator.cs
- ViewBox.cs
- PtsPage.cs
- WebPartMovingEventArgs.cs
- UnionCodeGroup.cs
- Link.cs
- TheQuery.cs
- AccessibleObject.cs
- UnsafeNativeMethods.cs
- IMembershipProvider.cs