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
- XmlDataCollection.cs
- Events.cs
- ListBoxChrome.cs
- XmlTextWriter.cs
- ScrollProviderWrapper.cs
- SchemaCollectionCompiler.cs
- StoreItemCollection.cs
- CompositeFontParser.cs
- TypeResolvingOptionsAttribute.cs
- TableLayoutPanelBehavior.cs
- CryptoKeySecurity.cs
- GridItemPattern.cs
- WorkflowStateRollbackService.cs
- TargetControlTypeAttribute.cs
- DirectoryObjectSecurity.cs
- XmlStringTable.cs
- XPathQilFactory.cs
- PagedDataSource.cs
- ShimAsPublicXamlType.cs
- ControlCollection.cs
- SqlRowUpdatingEvent.cs
- AddInProcess.cs
- basecomparevalidator.cs
- SubpageParagraph.cs
- PackageRelationshipCollection.cs
- CacheAxisQuery.cs
- StatusBar.cs
- DataGridDetailsPresenterAutomationPeer.cs
- SqlNode.cs
- DiscoveryDocumentSearchPattern.cs
- EntryIndex.cs
- DomainLiteralReader.cs
- CacheOutputQuery.cs
- ObjectQueryProvider.cs
- ContentDesigner.cs
- ToolTipService.cs
- HandleScope.cs
- MultipartIdentifier.cs
- Sql8ExpressionRewriter.cs
- DateTimeOffsetStorage.cs
- FontDifferentiator.cs
- InlineUIContainer.cs
- ToolStripScrollButton.cs
- FormatterConverter.cs
- TracingConnectionListener.cs
- _NtlmClient.cs
- ConcurrentStack.cs
- NativeMethods.cs
- ManipulationCompletedEventArgs.cs
- _SSPISessionCache.cs
- QuadraticBezierSegment.cs
- CapabilitiesUse.cs
- BinaryWriter.cs
- HostingPreferredMapPath.cs
- MessageDispatch.cs
- QueuePropertyVariants.cs
- InkCanvasInnerCanvas.cs
- XmlUrlResolver.cs
- TextClipboardData.cs
- StyleSelector.cs
- DeviceContext2.cs
- StreamGeometry.cs
- AspNetHostingPermission.cs
- AtomContentProperty.cs
- SmiRecordBuffer.cs
- HostingPreferredMapPath.cs
- FileUtil.cs
- ListViewGroup.cs
- VectorCollection.cs
- RepeatBehavior.cs
- ReadContentAsBinaryHelper.cs
- AppDomainUnloadedException.cs
- ProfilePropertySettings.cs
- WebPartAddingEventArgs.cs
- ToolStripStatusLabel.cs
- AppSettingsReader.cs
- ContextProperty.cs
- XmlSchemaAttributeGroup.cs
- ManipulationInertiaStartingEventArgs.cs
- TypeValidationEventArgs.cs
- SqlDataSourceView.cs
- MouseActionValueSerializer.cs
- ProxyManager.cs
- TextRunCacheImp.cs
- AsymmetricKeyExchangeDeformatter.cs
- StackSpiller.cs
- ContentDisposition.cs
- CodeDirectionExpression.cs
- BitmapImage.cs
- UrlEncodedParameterWriter.cs
- XmlSchemaCollection.cs
- InternalRelationshipCollection.cs
- KeyGestureValueSerializer.cs
- EndEvent.cs
- ButtonFieldBase.cs
- XmlCharCheckingReader.cs
- WebServicesInteroperability.cs
- CorrelationKey.cs
- ReadOnlyNameValueCollection.cs
- ComponentResourceKeyConverter.cs