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
- PreviewPageInfo.cs
- TimelineCollection.cs
- WinFormsSpinner.cs
- FixedSchema.cs
- AttributeCollection.cs
- ComponentResourceKey.cs
- WindowInteropHelper.cs
- ApplicationManager.cs
- DataGridViewComboBoxCell.cs
- MultilineStringConverter.cs
- TransformerTypeCollection.cs
- BaseTemplateCodeDomTreeGenerator.cs
- WinFormsUtils.cs
- FamilyCollection.cs
- UserPreferenceChangingEventArgs.cs
- CoTaskMemHandle.cs
- VisualStyleInformation.cs
- ListViewItem.cs
- WriteFileContext.cs
- ButtonChrome.cs
- Executor.cs
- SHA256Managed.cs
- StylesEditorDialog.cs
- SignedXml.cs
- XmlSchemaObject.cs
- SplashScreenNativeMethods.cs
- XmlQueryCardinality.cs
- WorkflowValidationFailedException.cs
- Helpers.cs
- DataObjectMethodAttribute.cs
- User.cs
- ContentPresenter.cs
- HttpCachePolicyElement.cs
- ISO2022Encoding.cs
- CodeActivityContext.cs
- SoapFormatter.cs
- InstanceCreationEditor.cs
- FirstMatchCodeGroup.cs
- GenericTypeParameterConverter.cs
- Vector3D.cs
- SymDocumentType.cs
- TextTreeExtractElementUndoUnit.cs
- NullableDecimalMinMaxAggregationOperator.cs
- CurrentChangingEventManager.cs
- CodeSubDirectoriesCollection.cs
- UniformGrid.cs
- ClientTargetCollection.cs
- QueryCacheKey.cs
- PtsHelper.cs
- CheckBoxFlatAdapter.cs
- XomlSerializationHelpers.cs
- RtType.cs
- DataBinder.cs
- APCustomTypeDescriptor.cs
- InternalBase.cs
- SaveRecipientRequest.cs
- HttpCookie.cs
- bindurihelper.cs
- SqlProfileProvider.cs
- TextLine.cs
- StrokeCollectionConverter.cs
- CustomWebEventKey.cs
- UserControl.cs
- ComNativeDescriptor.cs
- DivideByZeroException.cs
- RbTree.cs
- FunctionNode.cs
- MsiStyleLogWriter.cs
- ReliabilityContractAttribute.cs
- MachineKeySection.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- DrawTreeNodeEventArgs.cs
- ButtonColumn.cs
- VisualBasicSettingsHandler.cs
- _MultipleConnectAsync.cs
- IntSecurity.cs
- XPathNodeIterator.cs
- SafeEventHandle.cs
- LinqDataSourceView.cs
- ApplyTemplatesAction.cs
- QueryTask.cs
- OrderedParallelQuery.cs
- RequiredAttributeAttribute.cs
- OleDbRowUpdatingEvent.cs
- ManipulationLogic.cs
- PKCS1MaskGenerationMethod.cs
- MediaTimeline.cs
- AbsoluteQuery.cs
- CommandEventArgs.cs
- PenLineCapValidation.cs
- OdbcStatementHandle.cs
- SizeConverter.cs
- ListControlBuilder.cs
- XmlSerializer.cs
- BufferedMessageData.cs
- ACL.cs
- FormatVersion.cs
- TextBounds.cs
- VisualTreeUtils.cs
- BaseCollection.cs