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
- Switch.cs
- Freezable.cs
- EncryptedPackage.cs
- Content.cs
- DomainUpDown.cs
- TemplateBuilder.cs
- CultureInfo.cs
- SqlInternalConnection.cs
- BeginStoryboard.cs
- DataGridTextBoxColumn.cs
- SystemInfo.cs
- ValueOfAction.cs
- DBSqlParserColumn.cs
- Sorting.cs
- NativeMethods.cs
- OverrideMode.cs
- XmlKeywords.cs
- TriggerActionCollection.cs
- TransformedBitmap.cs
- Documentation.cs
- PathGeometry.cs
- DataGridViewSelectedCellCollection.cs
- SqlDataSourceWizardForm.cs
- ConfigurationManagerInternalFactory.cs
- ValidationError.cs
- CodeDelegateCreateExpression.cs
- Dump.cs
- Parser.cs
- DependencyObjectPropertyDescriptor.cs
- CodeConstructor.cs
- EditingCoordinator.cs
- ipaddressinformationcollection.cs
- DataRow.cs
- WebProxyScriptElement.cs
- SystemMulticastIPAddressInformation.cs
- XmlDocument.cs
- WSHttpBindingBaseElement.cs
- MinimizableAttributeTypeConverter.cs
- DataBindingHandlerAttribute.cs
- SettingsPropertyNotFoundException.cs
- CompositeActivityTypeDescriptorProvider.cs
- ObjectQueryState.cs
- BaseDataListPage.cs
- XmlCodeExporter.cs
- ThreadInterruptedException.cs
- HiddenFieldDesigner.cs
- SchemaTableOptionalColumn.cs
- ObservableDictionary.cs
- SuppressMessageAttribute.cs
- ImportCatalogPart.cs
- CircleHotSpot.cs
- TokenBasedSet.cs
- LinqDataSourceEditData.cs
- SamlAuthorizationDecisionStatement.cs
- XsdValidatingReader.cs
- XmlIlVisitor.cs
- StopStoryboard.cs
- XmlObjectSerializerContext.cs
- XPathDocumentIterator.cs
- PageBreakRecord.cs
- StrokeFIndices.cs
- IfJoinedCondition.cs
- BamlMapTable.cs
- Context.cs
- NamespaceList.cs
- PropertyChange.cs
- SoapAttributeAttribute.cs
- UIElementIsland.cs
- LinkAreaEditor.cs
- WindowInteractionStateTracker.cs
- ApplicationActivator.cs
- DataControlFieldCollection.cs
- UiaCoreTypesApi.cs
- MethodBuilderInstantiation.cs
- ScriptManager.cs
- HttpDigestClientCredential.cs
- RayHitTestParameters.cs
- DocumentXPathNavigator.cs
- XmlSchemaCollection.cs
- ComponentSerializationService.cs
- PropertyBuilder.cs
- ObjectViewEntityCollectionData.cs
- JsonXmlDataContract.cs
- ImageCodecInfo.cs
- ThreadLocal.cs
- UpdatePanelTrigger.cs
- ColorConverter.cs
- ViewRendering.cs
- Types.cs
- XmlParserContext.cs
- SettingsPropertyCollection.cs
- XmlWriter.cs
- IdnMapping.cs
- _FtpControlStream.cs
- EventPrivateKey.cs
- CategoryGridEntry.cs
- XmlSchemaRedefine.cs
- ScriptIgnoreAttribute.cs
- WebOperationContext.cs
- RotateTransform.cs