Edit

Share via


MessageHeaderException Constructors

Definition

Initializes a new instance of the MessageHeaderException class.

Overloads

MessageHeaderException()

Initializes a new instance of the MessageHeaderException class.

MessageHeaderException(String)

Initializes a new instance of the MessageHeaderException class with the specified message.

MessageHeaderException(SerializationInfo, StreamingContext)

Initializes a new instance of the MessageHeaderException class used to deserialize data into a MessageHeaderException object.

MessageHeaderException(String, Boolean)

Initializes a new instance of the MessageHeaderException class using the specified message and a value that indicates whether the message header is a duplicate or is missing.

MessageHeaderException(String, Exception)

Initializes a new instance of the MessageHeaderException class using the specified message and the inner exception that caused the exception.

MessageHeaderException(String, String, String)

Initializes a new instance of the MessageHeaderException class using the specified message, header name and namespace.

MessageHeaderException(String, String, String, Boolean)

Initializes a new instance of the MessageHeaderException class using the specified message, header name and namespace, and a value that indicates whether the message header is a duplicate or is missing.

MessageHeaderException(String, String, String, Exception)

Initializes a new instance of the MessageHeaderException class using the specified message, header name and namespace, and the inner exception that caused the exception.

MessageHeaderException(String, String, String, Boolean, Exception)

Initializes a new instance of the MessageHeaderException class using the specified message, header name and namespace, a value that indicates whether the message header is a duplicate or is missing, and the inner exception that caused the exception.

Remarks

If you want to pass an error message to the user, use the MessageHeaderException(String) constructor.

If you want to pass an error message and a reference to the inner exception that is the cause of the exception to the user, use the MessageHeaderException(String, Exception) constructor.

If you want to pass serialization information and streaming context, use the MessageHeaderException(SerializationInfo, StreamingContext) constructor.

MessageHeaderException()

Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs

Initializes a new instance of the MessageHeaderException class.

public:
 MessageHeaderException();
public MessageHeaderException ();
Public Sub New ()

Applies to

MessageHeaderException(String)

Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs

Initializes a new instance of the MessageHeaderException class with the specified message.

public:
 MessageHeaderException(System::String ^ message);
public MessageHeaderException (string message);
new System.ServiceModel.MessageHeaderException : string -> System.ServiceModel.MessageHeaderException
Public Sub New (message As String)

Parameters

message
String

The message carried in the exception.

Remarks

Use this constructor when you want to pass an error message to the user. The content of the message parameter should be understandable to the intended users.

Applies to

MessageHeaderException(SerializationInfo, StreamingContext)

Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs

Initializes a new instance of the MessageHeaderException class used to deserialize data into a MessageHeaderException object.

protected:
 MessageHeaderException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected MessageHeaderException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.ServiceModel.MessageHeaderException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.ServiceModel.MessageHeaderException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

The SerializationInfo that holds the serialized object data about the exception being thrown.

context
StreamingContext

The StreamingContext that contains contextual information about the source or destination.

Remarks

This constructor is called during deserialization to restore the exception object transmitted over a stream.

Applies to

MessageHeaderException(String, Boolean)

Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs

Initializes a new instance of the MessageHeaderException class using the specified message and a value that indicates whether the message header is a duplicate or is missing.

public:
 MessageHeaderException(System::String ^ message, bool isDuplicate);
public MessageHeaderException (string message, bool isDuplicate);
new System.ServiceModel.MessageHeaderException : string * bool -> System.ServiceModel.MessageHeaderException
Public Sub New (message As String, isDuplicate As Boolean)

Parameters

message
String

The exception message.

isDuplicate
Boolean

true if the multiple message header is a duplicate; false if there are no message headers.

Applies to

MessageHeaderException(String, Exception)

Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs

Initializes a new instance of the MessageHeaderException class using the specified message and the inner exception that caused the exception.

public:
 MessageHeaderException(System::String ^ message, Exception ^ innerException);
public MessageHeaderException (string message, Exception innerException);
new System.ServiceModel.MessageHeaderException : string * Exception -> System.ServiceModel.MessageHeaderException
Public Sub New (message As String, innerException As Exception)

Parameters

message
String

The exception message.

innerException
Exception

The Exception that contains the inner exception that caused the exception.

Remarks

Use this constructor when you want to pass an error message and information about an inner exception up to the user. The content of the message parameter should be understandable to the intended users.

An exception that is thrown as a direct result of a previous exception can include a reference to the previous exception in the InnerException property. The InnerException property returns the same value that is passed into the constructor or a null reference (Nothing in Visual Basic) if the InnerException property does not supply the inner exception value to the constructor.

Applies to

MessageHeaderException(String, String, String)

Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs

Initializes a new instance of the MessageHeaderException class using the specified message, header name and namespace.

public:
 MessageHeaderException(System::String ^ message, System::String ^ headerName, System::String ^ ns);
public MessageHeaderException (string message, string headerName, string ns);
new System.ServiceModel.MessageHeaderException : string * string * string -> System.ServiceModel.MessageHeaderException
Public Sub New (message As String, headerName As String, ns As String)

Parameters

message
String

The exception message.

headerName
String

The name of the message header.

ns
String

The namespace of the message header.

Applies to

MessageHeaderException(String, String, String, Boolean)

Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs

Initializes a new instance of the MessageHeaderException class using the specified message, header name and namespace, and a value that indicates whether the message header is a duplicate or is missing.

public:
 MessageHeaderException(System::String ^ message, System::String ^ headerName, System::String ^ ns, bool isDuplicate);
public MessageHeaderException (string message, string headerName, string ns, bool isDuplicate);
new System.ServiceModel.MessageHeaderException : string * string * string * bool -> System.ServiceModel.MessageHeaderException
Public Sub New (message As String, headerName As String, ns As String, isDuplicate As Boolean)

Parameters

message
String

The exception message.

headerName
String

The name of the message header.

ns
String

The namespace of the message header.

isDuplicate
Boolean

true if the multiple message header is a duplicate; false if there are no message headers.

Applies to

MessageHeaderException(String, String, String, Exception)

Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs

Initializes a new instance of the MessageHeaderException class using the specified message, header name and namespace, and the inner exception that caused the exception.

public:
 MessageHeaderException(System::String ^ message, System::String ^ headerName, System::String ^ ns, Exception ^ innerException);
public MessageHeaderException (string message, string headerName, string ns, Exception innerException);
new System.ServiceModel.MessageHeaderException : string * string * string * Exception -> System.ServiceModel.MessageHeaderException
Public Sub New (message As String, headerName As String, ns As String, innerException As Exception)

Parameters

message
String

The exception message.

headerName
String

The name of the message header.

ns
String

The namespace of the message header.

innerException
Exception

The Exception that contains the inner exception that caused the exception.

Applies to

MessageHeaderException(String, String, String, Boolean, Exception)

Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs

Initializes a new instance of the MessageHeaderException class using the specified message, header name and namespace, a value that indicates whether the message header is a duplicate or is missing, and the inner exception that caused the exception.

public:
 MessageHeaderException(System::String ^ message, System::String ^ headerName, System::String ^ ns, bool isDuplicate, Exception ^ innerException);
public MessageHeaderException (string message, string headerName, string ns, bool isDuplicate, Exception innerException);
new System.ServiceModel.MessageHeaderException : string * string * string * bool * Exception -> System.ServiceModel.MessageHeaderException
Public Sub New (message As String, headerName As String, ns As String, isDuplicate As Boolean, innerException As Exception)

Parameters

message
String

The exception message.

headerName
String

The name of the message header.

ns
String

The namespace of the message header.

isDuplicate
Boolean

true if the multiple message header is a duplicate; false if there are no message headers.

innerException
Exception

The Exception that contains the inner exception that caused the exception.

Applies to