Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / ProtocolException.cs / 1 / ProtocolException.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel { using System.Globalization; using System.Runtime.Serialization; using System.ServiceModel.Channels; [Serializable] public class ProtocolException : CommunicationException { public ProtocolException() { } public ProtocolException(string message) : base(message) { } public ProtocolException(string message, Exception innerException) : base(message, innerException) { } protected ProtocolException(SerializationInfo info, StreamingContext context) : base(info, context) { } internal static ProtocolException ReceiveShutdownReturnedNonNull(Message message) { if (message.IsFault) { try { MessageFault fault = MessageFault.CreateFault(message, 64 * 1024); FaultReasonText reason = fault.Reason.GetMatchingTranslation(CultureInfo.CurrentCulture); string text = SR.GetString(SR.ReceiveShutdownReturnedFault, reason.Text); return new ProtocolException(text); } catch (QuotaExceededException) { string text = SR.GetString(SR.ReceiveShutdownReturnedLargeFault, message.Headers.Action); return new ProtocolException(text); } } else { string text = SR.GetString(SR.ReceiveShutdownReturnedMessage, message.Headers.Action); return new ProtocolException(text); } } internal static ProtocolException OneWayOperationReturnedNonNull(Message message) { if (message.IsFault) { try { MessageFault fault = MessageFault.CreateFault(message, 64 * 1024); FaultReasonText reason = fault.Reason.GetMatchingTranslation(CultureInfo.CurrentCulture); string text = SR.GetString(SR.OneWayOperationReturnedFault, reason.Text); return new ProtocolException(text); } catch (QuotaExceededException) { string text = SR.GetString(SR.OneWayOperationReturnedLargeFault, message.Headers.Action); return new ProtocolException(text); } } else { string text = SR.GetString(SR.OneWayOperationReturnedMessage, message.Headers.Action); return new ProtocolException(text); } } } } // 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
- PowerModeChangedEventArgs.cs
- CollectionViewGroup.cs
- FormViewUpdatedEventArgs.cs
- AssociationSetEnd.cs
- DataGridViewAdvancedBorderStyle.cs
- RenderDataDrawingContext.cs
- XmlCharType.cs
- SimpleTypesSurrogate.cs
- TypeDescriptionProviderAttribute.cs
- HtmlEmptyTagControlBuilder.cs
- EnumValidator.cs
- ToolbarAUtomationPeer.cs
- EventLogEntryCollection.cs
- Grammar.cs
- codemethodreferenceexpression.cs
- SerializerProvider.cs
- Vector3DAnimation.cs
- _AutoWebProxyScriptWrapper.cs
- PKCS1MaskGenerationMethod.cs
- TraceContextEventArgs.cs
- Number.cs
- RichTextBox.cs
- ArithmeticException.cs
- ApplicationCommands.cs
- LassoHelper.cs
- TextTrailingWordEllipsis.cs
- sqlcontext.cs
- GeometryHitTestResult.cs
- RelatedPropertyManager.cs
- TextSchema.cs
- HtmlElementEventArgs.cs
- AuthorizationRuleCollection.cs
- sqlnorm.cs
- ColorComboBox.cs
- XamlStyleSerializer.cs
- DynamicPropertyReader.cs
- NavigationPropertyEmitter.cs
- EngineSiteSapi.cs
- MarkupCompilePass2.cs
- mediaeventshelper.cs
- versioninfo.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- CachedTypeface.cs
- StringFreezingAttribute.cs
- ScriptIgnoreAttribute.cs
- SecurityTokenProvider.cs
- NameHandler.cs
- DocumentViewerBaseAutomationPeer.cs
- WebBrowserEvent.cs
- SynchronizedKeyedCollection.cs
- QueryStoreStatusRequest.cs
- ValueChangedEventManager.cs
- ServiceRouteHandler.cs
- DeploymentSectionCache.cs
- XmlSchemaIdentityConstraint.cs
- TreeIterator.cs
- httpapplicationstate.cs
- DataStreams.cs
- LinqDataSourceView.cs
- List.cs
- ServiceDescriptionData.cs
- MenuTracker.cs
- FunctionImportMapping.cs
- RuntimeConfigLKG.cs
- StringValueSerializer.cs
- WebServiceErrorEvent.cs
- AccessDataSourceView.cs
- Connection.cs
- BitVector32.cs
- ObjectSecurity.cs
- CompositeCollection.cs
- DataGridViewColumnCollectionEditor.cs
- QueryPageSettingsEventArgs.cs
- DataServiceContext.cs
- Throw.cs
- MetadataArtifactLoaderFile.cs
- NavigatorInvalidBodyAccessException.cs
- sqlstateclientmanager.cs
- GenericAuthenticationEventArgs.cs
- RoutedEventArgs.cs
- X509UI.cs
- Deflater.cs
- MulticastIPAddressInformationCollection.cs
- EncodingInfo.cs
- TreeViewAutomationPeer.cs
- GroupQuery.cs
- BindingObserver.cs
- SymDocumentType.cs
- PackagePart.cs
- SessionPageStateSection.cs
- StopStoryboard.cs
- DesignerTransactionCloseEvent.cs
- COM2IDispatchConverter.cs
- BaseProcessor.cs
- ProcessThreadCollection.cs
- URLIdentityPermission.cs
- UnionCodeGroup.cs
- Hash.cs
- RtfControls.cs
- HtmlWindow.cs