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
- DynamicQueryableWrapper.cs
- OptimizedTemplateContent.cs
- RectKeyFrameCollection.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- TemplateXamlParser.cs
- LogWriteRestartAreaAsyncResult.cs
- InstanceView.cs
- SSmlParser.cs
- Int32Converter.cs
- wmiprovider.cs
- ByteAnimation.cs
- StronglyTypedResourceBuilder.cs
- GridViewRow.cs
- RequestQueue.cs
- PropertyChangeTracker.cs
- SuppressIldasmAttribute.cs
- FileUtil.cs
- HtmlHistory.cs
- ArgIterator.cs
- Repeater.cs
- CellRelation.cs
- Exceptions.cs
- FormViewDeletedEventArgs.cs
- ServicePoint.cs
- Vector3DCollection.cs
- ImageSourceValueSerializer.cs
- AttachmentCollection.cs
- TableAdapterManagerMethodGenerator.cs
- CompilationSection.cs
- VScrollProperties.cs
- XsdCachingReader.cs
- FontResourceCache.cs
- RepeaterItemCollection.cs
- KnownTypes.cs
- SqlMethodCallConverter.cs
- CodePageEncoding.cs
- StructuralType.cs
- WsdlInspector.cs
- CharacterBuffer.cs
- ChildDocumentBlock.cs
- HwndSourceKeyboardInputSite.cs
- GridLength.cs
- TextDecoration.cs
- DataGridViewColumnDesigner.cs
- BindingSourceDesigner.cs
- CompoundFileIOPermission.cs
- CodeConditionStatement.cs
- _KerberosClient.cs
- CodeTypeReferenceExpression.cs
- XmlAtomicValue.cs
- InProcStateClientManager.cs
- CornerRadius.cs
- StyleBamlTreeBuilder.cs
- IFormattable.cs
- EventWaitHandleSecurity.cs
- EasingKeyFrames.cs
- DescendantBaseQuery.cs
- ToolboxSnapDragDropEventArgs.cs
- LayoutEvent.cs
- AppDomain.cs
- SqlConnectionPoolGroupProviderInfo.cs
- ConfigurationSectionCollection.cs
- TextBoxView.cs
- RuntimeArgumentHandle.cs
- TdsParameterSetter.cs
- CodeDefaultValueExpression.cs
- MembershipSection.cs
- DecimalConverter.cs
- TypeCodeDomSerializer.cs
- ListSortDescriptionCollection.cs
- TextRunCache.cs
- TrustLevelCollection.cs
- Utility.cs
- PositiveTimeSpanValidator.cs
- XamlBuildProvider.cs
- NameValuePair.cs
- LocatorPartList.cs
- Proxy.cs
- ReflectionPermission.cs
- HttpTransportElement.cs
- BaseServiceProvider.cs
- EntitySqlQueryCacheEntry.cs
- securitycriticaldataClass.cs
- DataAccessException.cs
- DispatcherExceptionFilterEventArgs.cs
- ThreadInterruptedException.cs
- HtmlElementCollection.cs
- GPPOINTF.cs
- RectangleConverter.cs
- CharEnumerator.cs
- PolyLineSegment.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- WebPartUtil.cs
- ClockGroup.cs
- GroupAggregateExpr.cs
- PaintValueEventArgs.cs
- IisTraceWebEventProvider.cs
- BuilderPropertyEntry.cs
- ConfigurationValidatorAttribute.cs
- EndOfStreamException.cs