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
- SafeViewOfFileHandle.cs
- SiteMapPath.cs
- PenThreadWorker.cs
- PartBasedPackageProperties.cs
- RoleService.cs
- InstallerTypeAttribute.cs
- Boolean.cs
- BitmapEffectInput.cs
- DesignTimeValidationFeature.cs
- TextChange.cs
- CustomWebEventKey.cs
- MimePart.cs
- PeoplePickerWrapper.cs
- thaishape.cs
- GridViewRowPresenterBase.cs
- TextEditorDragDrop.cs
- SafeCoTaskMem.cs
- SingleConverter.cs
- NewExpression.cs
- TemplatePartAttribute.cs
- UpdatePanelTriggerCollection.cs
- HtmlUtf8RawTextWriter.cs
- ComponentFactoryHelpers.cs
- safex509handles.cs
- DmlSqlGenerator.cs
- DataMemberConverter.cs
- ConnectionStringsExpressionBuilder.cs
- NameSpaceEvent.cs
- ListBoxAutomationPeer.cs
- SrgsOneOf.cs
- DesigntimeLicenseContextSerializer.cs
- WebPartConnectionsCancelVerb.cs
- BinaryCommonClasses.cs
- Tile.cs
- SerializationObjectManager.cs
- ToolStripItemRenderEventArgs.cs
- DispatchWrapper.cs
- WebPartConnectionsEventArgs.cs
- ContextStack.cs
- TextTreeUndoUnit.cs
- ToolboxItemFilterAttribute.cs
- SoapSchemaImporter.cs
- AttributeQuery.cs
- FormsAuthenticationConfiguration.cs
- ButtonRenderer.cs
- ListViewInsertionMark.cs
- QueryExpr.cs
- CacheHelper.cs
- DataMemberConverter.cs
- ControlBuilderAttribute.cs
- DataColumnCollection.cs
- MethodImplAttribute.cs
- ControlBuilderAttribute.cs
- DesignerView.xaml.cs
- PathFigure.cs
- DataAdapter.cs
- CodeDelegateCreateExpression.cs
- TerminateDesigner.cs
- XmlObjectSerializerReadContext.cs
- SyndicationDeserializer.cs
- UnSafeCharBuffer.cs
- ScriptResourceAttribute.cs
- XsltArgumentList.cs
- DrawingContextWalker.cs
- HelpEvent.cs
- FileDialogPermission.cs
- SerializableTypeCodeDomSerializer.cs
- RegularExpressionValidator.cs
- InvalidAsynchronousStateException.cs
- dsa.cs
- mediaeventshelper.cs
- XmlAttributeProperties.cs
- RestHandler.cs
- SQLCharsStorage.cs
- MouseCaptureWithinProperty.cs
- DesignerTransactionCloseEvent.cs
- IgnoreFlushAndCloseStream.cs
- FlowDocumentReader.cs
- DragStartedEventArgs.cs
- Button.cs
- Rect3DConverter.cs
- ToolStripDropDownClosedEventArgs.cs
- BrowserDefinitionCollection.cs
- PageSetupDialog.cs
- Button.cs
- WebServiceTypeData.cs
- TrustExchangeException.cs
- SharedRuntimeState.cs
- RuleProcessor.cs
- ToolStripScrollButton.cs
- XmlCodeExporter.cs
- ExpandSegment.cs
- HttpRequest.cs
- FilteredAttributeCollection.cs
- WizardDesigner.cs
- WebPartHeaderCloseVerb.cs
- QueryCacheKey.cs
- PointCollectionConverter.cs
- AbstractSvcMapFileLoader.cs
- BitmapMetadataEnumerator.cs