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
- DesignerDataTableBase.cs
- Parser.cs
- DataControlButton.cs
- ConfigurationManagerHelper.cs
- SystemResourceKey.cs
- FunctionGenerator.cs
- DocumentViewerConstants.cs
- GetPageCompletedEventArgs.cs
- CodeTypeParameter.cs
- BitmapEffectInputData.cs
- WsdlBuildProvider.cs
- AccessDataSource.cs
- ActivityPreviewDesigner.cs
- BinaryUtilClasses.cs
- CounterSample.cs
- Context.cs
- PropertyFilterAttribute.cs
- ResourceSetExpression.cs
- HMAC.cs
- AbstractDataSvcMapFileLoader.cs
- TripleDES.cs
- TemplatedAdorner.cs
- DataConnectionHelper.cs
- BulletedListEventArgs.cs
- SQLSingleStorage.cs
- HttpDebugHandler.cs
- ConstraintEnumerator.cs
- FormsAuthentication.cs
- ForeignConstraint.cs
- StdValidatorsAndConverters.cs
- DataGridHeaderBorder.cs
- StubHelpers.cs
- WebServiceHandlerFactory.cs
- AssemblyInfo.cs
- ITreeGenerator.cs
- DataGrid.cs
- ScriptControl.cs
- CodeAccessPermission.cs
- OutputChannelBinder.cs
- EnumBuilder.cs
- BindingExpressionUncommonField.cs
- Menu.cs
- RootDesignerSerializerAttribute.cs
- HashCodeCombiner.cs
- DataRow.cs
- ClientFormsAuthenticationCredentials.cs
- ReadWriteControlDesigner.cs
- CollectionConverter.cs
- TextSerializer.cs
- EncoderNLS.cs
- _UncName.cs
- GlyphingCache.cs
- CustomAttribute.cs
- PieceDirectory.cs
- ToolbarAUtomationPeer.cs
- HtmlTableRow.cs
- Splitter.cs
- LassoSelectionBehavior.cs
- WbemProvider.cs
- SqlRemoveConstantOrderBy.cs
- Native.cs
- VerificationException.cs
- JournalEntry.cs
- MenuRenderer.cs
- HtmlInputHidden.cs
- FloaterBaseParagraph.cs
- Transactions.cs
- LicenseManager.cs
- RelationHandler.cs
- AttributeProviderAttribute.cs
- PromptEventArgs.cs
- CodeDirectionExpression.cs
- tooltip.cs
- SecurityToken.cs
- PaintEvent.cs
- ApplicationTrust.cs
- CodeGenHelper.cs
- ManipulationDelta.cs
- TraceHandler.cs
- CachingHintValidation.cs
- HashRepartitionStream.cs
- COAUTHIDENTITY.cs
- RemoteWebConfigurationHost.cs
- RewritingSimplifier.cs
- ServiceMetadataContractBehavior.cs
- Library.cs
- StringSource.cs
- DataReaderContainer.cs
- EntityDataSourceReferenceGroup.cs
- GradientStop.cs
- AlternationConverter.cs
- TextMarkerSource.cs
- ProxySimple.cs
- StorageEndPropertyMapping.cs
- FixedSOMLineRanges.cs
- ModuleBuilderData.cs
- BaseConfigurationRecord.cs
- StorageModelBuildProvider.cs
- FileLogRecord.cs
- Int32EqualityComparer.cs