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
- OptionUsage.cs
- HttpListenerPrefixCollection.cs
- CachedFontFamily.cs
- OverlappedAsyncResult.cs
- DataGridViewCellValueEventArgs.cs
- RegexRunnerFactory.cs
- ListMarkerSourceInfo.cs
- TableCellAutomationPeer.cs
- DefaultTraceListener.cs
- HMACSHA256.cs
- WebPageTraceListener.cs
- SecurityTokenTypes.cs
- XmlSchemaComplexContentRestriction.cs
- HttpVersion.cs
- SiteMapHierarchicalDataSourceView.cs
- ToolStripTextBox.cs
- SetterBase.cs
- CollectionViewSource.cs
- OrderedDictionary.cs
- SQLGuidStorage.cs
- SettingsContext.cs
- TargetInvocationException.cs
- CharacterBuffer.cs
- ManipulationDelta.cs
- FunctionNode.cs
- FileLoadException.cs
- DispatcherFrame.cs
- FrameworkElement.cs
- TextParaClient.cs
- FontFaceLayoutInfo.cs
- OdbcParameterCollection.cs
- XmlSchemaSimpleTypeList.cs
- _MultipleConnectAsync.cs
- Size.cs
- WebPartConnectVerb.cs
- Camera.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- TableColumn.cs
- SqlDataSourceStatusEventArgs.cs
- ExtendedPropertyDescriptor.cs
- DiscoveryInnerClientAdhoc11.cs
- ClonableStack.cs
- TcpProcessProtocolHandler.cs
- Composition.cs
- StorageEntitySetMapping.cs
- webclient.cs
- FileDataSourceCache.cs
- TypeBinaryExpression.cs
- TableHeaderCell.cs
- EventlogProvider.cs
- odbcmetadatafactory.cs
- ReturnType.cs
- NativeMethods.cs
- DataGridViewTextBoxColumn.cs
- HtmlInputImage.cs
- StylesEditorDialog.cs
- SourceItem.cs
- BevelBitmapEffect.cs
- LookupNode.cs
- ToolStripContentPanel.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- SQLRoleProvider.cs
- MenuCommand.cs
- AuthenticationModulesSection.cs
- XomlCompilerHelpers.cs
- DefaultBindingPropertyAttribute.cs
- ListCommandEventArgs.cs
- DataGridTableCollection.cs
- ConfigXmlElement.cs
- EncodingNLS.cs
- XmlSchemaCompilationSettings.cs
- Condition.cs
- DataKeyCollection.cs
- WebPartConnectionsEventArgs.cs
- FrameworkRichTextComposition.cs
- DynamicRouteExpression.cs
- ClockGroup.cs
- ContainerControl.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- MarginCollapsingState.cs
- PropertyBuilder.cs
- StringReader.cs
- TreeWalkHelper.cs
- ThicknessConverter.cs
- Span.cs
- ControlAdapter.cs
- Gdiplus.cs
- PlatformNotSupportedException.cs
- HttpCacheParams.cs
- _NegoState.cs
- DBConcurrencyException.cs
- SafeNativeMethods.cs
- NavigationFailedEventArgs.cs
- DisplayNameAttribute.cs
- NumberFormatter.cs
- ConfigurationStrings.cs
- LightweightEntityWrapper.cs
- PrincipalPermission.cs
- ClientSettingsStore.cs
- RemotingException.cs