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
- IndexingContentUnit.cs
- DoubleCollection.cs
- LineInfo.cs
- HttpServerChannel.cs
- SuppressMessageAttribute.cs
- FileDialogPermission.cs
- HtmlInputText.cs
- WindowsListBox.cs
- FileUpload.cs
- ToolStripItemCollection.cs
- Model3D.cs
- TemplateControlCodeDomTreeGenerator.cs
- SafeLibraryHandle.cs
- XmlUrlResolver.cs
- ExtendedPropertyDescriptor.cs
- ScaleTransform.cs
- GenericRootAutomationPeer.cs
- CodeChecksumPragma.cs
- SessionSwitchEventArgs.cs
- jithelpers.cs
- WrappedKeySecurityTokenParameters.cs
- RegexFCD.cs
- PlatformCulture.cs
- TextServicesDisplayAttributePropertyRanges.cs
- WebControlsSection.cs
- XmlCharType.cs
- IBuiltInEvidence.cs
- SqlDataSourceCache.cs
- DBNull.cs
- PowerModeChangedEventArgs.cs
- XmlSchemaElement.cs
- TraceHandlerErrorFormatter.cs
- PopOutPanel.cs
- ConfigurationSettings.cs
- CrossContextChannel.cs
- TileModeValidation.cs
- CharConverter.cs
- ConfigurationSectionGroupCollection.cs
- ISFTagAndGuidCache.cs
- StructuredType.cs
- WebServiceEnumData.cs
- AuthenticationSection.cs
- ReadingWritingEntityEventArgs.cs
- _KerberosClient.cs
- ObjectDataSourceEventArgs.cs
- EventListener.cs
- AddressAlreadyInUseException.cs
- PenThreadPool.cs
- PostBackOptions.cs
- NoResizeSelectionBorderGlyph.cs
- ProcessModelInfo.cs
- ClientOptions.cs
- ArrangedElement.cs
- Hex.cs
- Attributes.cs
- TransactionInterop.cs
- UIHelper.cs
- ProjectionCamera.cs
- MenuStrip.cs
- SmiEventStream.cs
- AssemblyHash.cs
- SqlWebEventProvider.cs
- XamlSerializerUtil.cs
- TemplatePartAttribute.cs
- CustomPopupPlacement.cs
- Process.cs
- XmlWriterTraceListener.cs
- EntityDataSourceDataSelection.cs
- RoutedPropertyChangedEventArgs.cs
- ServicesUtilities.cs
- EnumMemberAttribute.cs
- ZoomPercentageConverter.cs
- ProfessionalColorTable.cs
- User.cs
- PluralizationService.cs
- HttpRequestCacheValidator.cs
- TypeSystem.cs
- ClientEventManager.cs
- ReferentialConstraint.cs
- BitmapCache.cs
- DataGridColumn.cs
- DesigntimeLicenseContextSerializer.cs
- HiddenFieldDesigner.cs
- DataGridViewAutoSizeModeEventArgs.cs
- DataRecordObjectView.cs
- LiteralLink.cs
- RightNameExpirationInfoPair.cs
- Activity.cs
- ForceCopyBuildProvider.cs
- Deserializer.cs
- contentDescriptor.cs
- FieldNameLookup.cs
- CompiledQueryCacheKey.cs
- _LocalDataStoreMgr.cs
- RadialGradientBrush.cs
- ToolStripSeparatorRenderEventArgs.cs
- AsymmetricSignatureFormatter.cs
- AxWrapperGen.cs
- CheckBox.cs
- CategoryNameCollection.cs