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

Initializes a new instance of the MessageHeaderException class.

C#
public MessageHeaderException();

Applies to

.NET Framework 4.8.1 e altre versioni
Prodotto Versioni
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

MessageHeaderException(String)

Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs

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

C#
public MessageHeaderException(string message);

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

.NET 10 (package-provided) e altre versioni
Prodotto Versioni
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

MessageHeaderException(SerializationInfo, StreamingContext)

Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs

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

C#
protected MessageHeaderException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);

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

.NET 10 (package-provided) e altre versioni
Prodotto Versioni
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

MessageHeaderException(String, Boolean)

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.

C#
public MessageHeaderException(string message, bool isDuplicate);

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

.NET 10 (package-provided) e altre versioni
Prodotto Versioni
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

MessageHeaderException(String, Exception)

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.

C#
public MessageHeaderException(string message, Exception innerException);

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

.NET 10 (package-provided) e altre versioni
Prodotto Versioni
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

MessageHeaderException(String, String, String)

Source:
MessageHeaderException.cs
Source:
MessageHeaderException.cs

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

C#
public MessageHeaderException(string message, string headerName, string ns);

Parameters

message
String

The exception message.

headerName
String

The name of the message header.

ns
String

The namespace of the message header.

Applies to

.NET 10 (package-provided) e altre versioni
Prodotto Versioni
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

MessageHeaderException(String, String, String, Boolean)

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.

C#
public MessageHeaderException(string message, string headerName, string ns, bool isDuplicate);

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

.NET 10 (package-provided) e altre versioni
Prodotto Versioni
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

MessageHeaderException(String, String, String, Exception)

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.

C#
public MessageHeaderException(string message, string headerName, string ns, Exception innerException);

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

.NET 10 (package-provided) e altre versioni
Prodotto Versioni
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

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

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.

C#
public MessageHeaderException(string message, string headerName, string ns, bool isDuplicate, Exception innerException);

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

.NET 10 (package-provided) e altre versioni
Prodotto Versioni
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0