Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / MessageHeaderException.cs / 1 / MessageHeaderException.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel { using System; using System.ServiceModel.Channels; using System.Runtime.Serialization; [Serializable] public class MessageHeaderException : ProtocolException { [NonSerialized] string headerName; [NonSerialized] string headerNamespace; [NonSerialized] bool isDuplicate; public MessageHeaderException(string message) : this(message, null, null) { } public MessageHeaderException(string message, bool isDuplicate) : this(message, null, null) { } public MessageHeaderException(string message, Exception innerException) : this(message, null, null, innerException) { } public MessageHeaderException(string message, string headerName, string ns) : this(message, headerName, ns, null) { } public MessageHeaderException(string message, string headerName, string ns, bool isDuplicate) : this(message, headerName, ns, isDuplicate, null) { } public MessageHeaderException(string message, string headerName, string ns, Exception innerException) : this(message, headerName, ns, false, innerException) { } public MessageHeaderException(string message, string headerName, string ns, bool isDuplicate, Exception innerException) : base(message, innerException) { this.headerName = headerName; this.headerNamespace = ns; this.isDuplicate = isDuplicate; } public string HeaderName { get { return this.headerName; } } public string HeaderNamespace { get { return this.headerNamespace; } } // IsDuplicate==true means there was more than one; IsDuplicate==false means there were zero public bool IsDuplicate { get { return this.isDuplicate; } } internal Message ProvideFault(MessageVersion messageVersion) { DiagnosticUtility.DebugAssert(messageVersion.Addressing == AddressingVersion.WSAddressing10, ""); WSAddressing10ProblemHeaderQNameFault phf = new WSAddressing10ProblemHeaderQNameFault(this); Message message = System.ServiceModel.Channels.Message.CreateMessage(messageVersion, phf, AddressingVersion.WSAddressing10.FaultAction); phf.AddHeaders(message.Headers); return message; } // for serialization public MessageHeaderException() { } protected MessageHeaderException(SerializationInfo info, StreamingContext context) : base(info, context) { } } } // 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
- DriveInfo.cs
- _BasicClient.cs
- StreamInfo.cs
- ToolStripLocationCancelEventArgs.cs
- RequestSecurityTokenResponseCollection.cs
- _NegotiateClient.cs
- GeneralTransform3DTo2D.cs
- X509ChainElement.cs
- SqlDataSourceSelectingEventArgs.cs
- BinaryObjectInfo.cs
- Thread.cs
- StorageEntityContainerMapping.cs
- ComplexType.cs
- Label.cs
- EventHandlerList.cs
- ObjectQueryExecutionPlan.cs
- MappedMetaModel.cs
- BindableAttribute.cs
- XmlParserContext.cs
- CompilerLocalReference.cs
- Helpers.cs
- DataGridViewComboBoxColumnDesigner.cs
- Comparer.cs
- PersistenceTypeAttribute.cs
- NodeFunctions.cs
- GridViewDeleteEventArgs.cs
- SchemaEntity.cs
- RelOps.cs
- CodeDomLocalizationProvider.cs
- MobileControlDesigner.cs
- ButtonAutomationPeer.cs
- HttpResponseHeader.cs
- SelectedCellsCollection.cs
- SpecialFolderEnumConverter.cs
- XmlParser.cs
- OdbcRowUpdatingEvent.cs
- ToolStripSeparatorRenderEventArgs.cs
- SqlBuffer.cs
- Stack.cs
- TextEditorDragDrop.cs
- GradientStop.cs
- ExpressionVisitorHelpers.cs
- DocumentViewerBaseAutomationPeer.cs
- XLinq.cs
- RawStylusInputReport.cs
- EdmEntityTypeAttribute.cs
- WindowsTitleBar.cs
- EntityDataSourceMemberPath.cs
- Color.cs
- EdmFunction.cs
- StreamUpdate.cs
- GridView.cs
- PrivilegeNotHeldException.cs
- ElementAction.cs
- FileInfo.cs
- DataGridViewIntLinkedList.cs
- RunInstallerAttribute.cs
- StylusCollection.cs
- TableItemProviderWrapper.cs
- EntityModelSchemaGenerator.cs
- MatrixCamera.cs
- SecurityTokenParametersEnumerable.cs
- FormClosedEvent.cs
- RSAPKCS1KeyExchangeFormatter.cs
- EntityContainer.cs
- OleDbStruct.cs
- DataGridViewHitTestInfo.cs
- NameValueFileSectionHandler.cs
- OleDbEnumerator.cs
- AnonymousIdentificationModule.cs
- NativeMethodsCLR.cs
- InternalBase.cs
- DecoderBestFitFallback.cs
- DefaultBinder.cs
- GeometryModel3D.cs
- DataSourceSelectArguments.cs
- SpeechSynthesizer.cs
- LabelAutomationPeer.cs
- UseLicense.cs
- SequentialUshortCollection.cs
- DataGridColumnReorderingEventArgs.cs
- _NestedSingleAsyncResult.cs
- RuntimeWrappedException.cs
- ColorTransform.cs
- FreezableCollection.cs
- StaticFileHandler.cs
- AuthenticationModuleElement.cs
- MutexSecurity.cs
- CodeTypeReferenceExpression.cs
- PointAnimationClockResource.cs
- WeakReferenceList.cs
- PropertyTabChangedEvent.cs
- PermissionSetTriple.cs
- BindingManagerDataErrorEventArgs.cs
- PeerConnector.cs
- ProcessHostFactoryHelper.cs
- UrlAuthFailedErrorFormatter.cs
- DummyDataSource.cs
- TextFormatterHost.cs
- TraceRecord.cs