Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / TransactionChannelFaultConverter.cs / 1 / TransactionChannelFaultConverter.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //------------------- namespace System.ServiceModel.Channels { using System; using System.ServiceModel; using System.Globalization; class TransactionChannelFaultConverter: FaultConverter where TChannel : class, IChannel { TransactionChannel channel; internal TransactionChannelFaultConverter(TransactionChannel channel) { this.channel = channel; } protected override bool OnTryCreateException(Message message, MessageFault fault, out Exception exception) { if(message.Headers.Action == FaultCodeConstants.Actions.Transactions) { exception = new ProtocolException(fault.Reason.GetMatchingTranslation(CultureInfo.CurrentCulture).Text); return true; } if(fault.IsMustUnderstandFault) { MessageHeader header = this.channel.Formatter.EmptyTransactionHeader; if(MessageFault.WasHeaderNotUnderstood(message.Headers, header.Name, header.Namespace)) { exception = new ProtocolException(SR.GetString(SR.SFxTransactionHeaderNotUnderstood, header.Name, header.Namespace, this.channel.Protocol)); return true; } } FaultConverter inner = this.channel.GetInnerProperty (); if (inner != null) { return inner.TryCreateException(message, fault, out exception); } else { exception = null; return false; } } protected override bool OnTryCreateFaultMessage(Exception exception, out Message message) { FaultConverter inner = this.channel.GetInnerProperty (); if (inner != null) { return inner.TryCreateFaultMessage(exception, out message); } else { message = null; return false; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TransactionManager.cs
- RowToParametersTransformer.cs
- TransformationRules.cs
- WebPartTracker.cs
- GorillaCodec.cs
- TableParagraph.cs
- NavigationPropertySingletonExpression.cs
- JumpTask.cs
- InvokePattern.cs
- EntitySet.cs
- DateTimeConstantAttribute.cs
- DataRowView.cs
- wgx_commands.cs
- ScrollPattern.cs
- IntSecurity.cs
- KoreanLunisolarCalendar.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- StatusBarAutomationPeer.cs
- D3DImage.cs
- ServicesSection.cs
- AstTree.cs
- MsmqIntegrationValidationBehavior.cs
- WebBrowserProgressChangedEventHandler.cs
- categoryentry.cs
- AsyncResult.cs
- FrameworkTemplate.cs
- DaylightTime.cs
- SymmetricCryptoHandle.cs
- WebEvents.cs
- ConditionBrowserDialog.cs
- Logging.cs
- DispatchOperation.cs
- FileDialog_Vista_Interop.cs
- BlobPersonalizationState.cs
- InternalsVisibleToAttribute.cs
- ProfileService.cs
- GroupedContextMenuStrip.cs
- ObfuscateAssemblyAttribute.cs
- FormViewPageEventArgs.cs
- Attributes.cs
- DecimalAnimationBase.cs
- PassportAuthentication.cs
- EntityExpressionVisitor.cs
- sitestring.cs
- HttpValueCollection.cs
- DescendantOverDescendantQuery.cs
- RectangleGeometry.cs
- DataMemberConverter.cs
- SQLDoubleStorage.cs
- WebServiceFault.cs
- TableCellCollection.cs
- TrackBar.cs
- XmlCharCheckingReader.cs
- AffineTransform3D.cs
- WebBrowserNavigatingEventHandler.cs
- TokenFactoryBase.cs
- XmlSchemaValidationException.cs
- _BasicClient.cs
- SystemColorTracker.cs
- XmlWriterTraceListener.cs
- TextSelectionHelper.cs
- Pointer.cs
- Constraint.cs
- WebControlAdapter.cs
- CookieParameter.cs
- PageCache.cs
- KeyGesture.cs
- ControlBuilderAttribute.cs
- TimeoutValidationAttribute.cs
- CapabilitiesState.cs
- DataGridBoolColumn.cs
- ProxySimple.cs
- TextEditorContextMenu.cs
- CallbackHandler.cs
- Timer.cs
- DispatcherTimer.cs
- hwndwrapper.cs
- UnitySerializationHolder.cs
- MsmqProcessProtocolHandler.cs
- DesignSurfaceManager.cs
- BinaryNode.cs
- Dispatcher.cs
- OleDbParameter.cs
- AsymmetricKeyExchangeDeformatter.cs
- MimeXmlImporter.cs
- FontInfo.cs
- SchemaMapping.cs
- CapabilitiesAssignment.cs
- PropertyGrid.cs
- ReferencedType.cs
- DurableInstanceProvider.cs
- BamlLocalizabilityResolver.cs
- FontSource.cs
- SystemIcmpV4Statistics.cs
- Attributes.cs
- PinnedBufferMemoryStream.cs
- ActivityDesignerLayoutSerializers.cs
- UnicodeEncoding.cs
- HandlerMappingMemo.cs
- SByteConverter.cs