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
- ActivityExecutor.cs
- SiteMapDataSource.cs
- SQLBytesStorage.cs
- CreateUserWizard.cs
- MsmqBindingMonitor.cs
- TreeViewItemAutomationPeer.cs
- IsolatedStoragePermission.cs
- PartitionerQueryOperator.cs
- HwndTarget.cs
- SequenceNumber.cs
- ToolStripItemRenderEventArgs.cs
- WsatServiceCertificate.cs
- CopyNodeSetAction.cs
- ToolStripManager.cs
- ConfigurationPermission.cs
- ProtocolViolationException.cs
- InvalidPrinterException.cs
- SoapHttpTransportImporter.cs
- ManagementOperationWatcher.cs
- VisualStateManager.cs
- SelectorAutomationPeer.cs
- DeflateStream.cs
- ContextStack.cs
- ReverseInheritProperty.cs
- CrossAppDomainChannel.cs
- Point4DConverter.cs
- ByteStream.cs
- ResXFileRef.cs
- Html32TextWriter.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- tooltip.cs
- HostedTransportConfigurationBase.cs
- WCFBuildProvider.cs
- ServiceContractAttribute.cs
- RestHandlerFactory.cs
- CompressedStack.cs
- GenericEnumerator.cs
- PolicyUnit.cs
- EmptyReadOnlyDictionaryInternal.cs
- SecureEnvironment.cs
- HierarchicalDataBoundControl.cs
- ViewEvent.cs
- HighlightVisual.cs
- ComboBox.cs
- ReliabilityContractAttribute.cs
- CustomTypeDescriptor.cs
- DecoderFallbackWithFailureFlag.cs
- xmlfixedPageInfo.cs
- SubMenuStyleCollection.cs
- CurrentChangedEventManager.cs
- FormViewInsertedEventArgs.cs
- IssuedTokenClientElement.cs
- ClientFormsAuthenticationCredentials.cs
- MailDefinition.cs
- BamlMapTable.cs
- MdiWindowListStrip.cs
- keycontainerpermission.cs
- MultipartIdentifier.cs
- ProcessModuleCollection.cs
- EventPrivateKey.cs
- X509SecurityTokenAuthenticator.cs
- ConfigXmlComment.cs
- PopOutPanel.cs
- OdbcErrorCollection.cs
- SqlRowUpdatedEvent.cs
- HttpGetClientProtocol.cs
- AssertFilter.cs
- TextViewDesigner.cs
- TrackingProfile.cs
- FixedPosition.cs
- DefaultCommandExtensionCallback.cs
- TableParagraph.cs
- SchemaCollectionCompiler.cs
- DataBindEngine.cs
- Input.cs
- SqlExpander.cs
- DoubleLinkListEnumerator.cs
- DataGridLinkButton.cs
- TransactionScope.cs
- ValueOfAction.cs
- StrokeNodeData.cs
- InvalidateEvent.cs
- MultipleViewPattern.cs
- BatchStream.cs
- SimpleWorkerRequest.cs
- XmlLanguageConverter.cs
- AmbientProperties.cs
- WebServiceResponseDesigner.cs
- StylusPointDescription.cs
- DataColumn.cs
- XpsResourcePolicy.cs
- DataControlCommands.cs
- NameValueSectionHandler.cs
- InstanceKeyCollisionException.cs
- WindowsListBox.cs
- XPathNodeList.cs
- WebContext.cs
- Imaging.cs
- regiisutil.cs
- PermissionRequestEvidence.cs