MessageHeader.CreateHeader Method

Definition

Creates a new message header.

Overloads

CreateHeader(String, String, Object)

Creates a new message header with the specified data.

CreateHeader(String, String, Object, Boolean)

Creates a new message header with the specified data.

CreateHeader(String, String, Object, XmlObjectSerializer)

Creates a header from an object to be serialized using the XmlFormatter.

CreateHeader(String, String, Object, Boolean, String)

Creates a new message header with the specified data.

CreateHeader(String, String, Object, XmlObjectSerializer, Boolean)

Creates a new message header with the specified data.

CreateHeader(String, String, Object, Boolean, String, Boolean)

Creates a new message header with the specified data.

CreateHeader(String, String, Object, XmlObjectSerializer, Boolean, String)

Creates a new message header with the specified data.

CreateHeader(String, String, Object, XmlObjectSerializer, Boolean, String, Boolean)

Creates a new message header with the specified data.

CreateHeader(String, String, Object)

Source:
MessageHeader.cs
Source:
MessageHeader.cs

Creates a new message header with the specified data.

public static System.ServiceModel.Channels.MessageHeader CreateHeader (string name, string ns, object value);

Parameters

name
String

The local name of the header XML element.

ns
String

The namespace URI of the header XML element.

value
Object

The content of the header to be created.

Returns

A new MessageHeader object with the specified data.

Applies to

.NET 8 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 8 (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 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

CreateHeader(String, String, Object, Boolean)

Source:
MessageHeader.cs
Source:
MessageHeader.cs

Creates a new message header with the specified data.

public static System.ServiceModel.Channels.MessageHeader CreateHeader (string name, string ns, object value, bool mustUnderstand);

Parameters

name
String

The local name of the header XML element.

ns
String

The namespace URI of the header XML element.

value
Object

The content of the header to be created.

mustUnderstand
Boolean

A value that indicates whether the header must be understood.

Returns

A new MessageHeader object with the specified data.

Applies to

.NET 8 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 8 (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 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

CreateHeader(String, String, Object, XmlObjectSerializer)

Source:
MessageHeader.cs
Source:
MessageHeader.cs

Creates a header from an object to be serialized using the XmlFormatter.

public static System.ServiceModel.Channels.MessageHeader CreateHeader (string name, string ns, object value, System.Runtime.Serialization.XmlObjectSerializer serializer);

Parameters

name
String

The local name of the header XML element.

ns
String

The namespace URI of the header XML element.

value
Object

The content of the header to be created.

serializer
XmlObjectSerializer

An XmlObjectSerializer that is used to serialize the header.

Returns

A new MessageHeader object with the specified data.

Applies to

.NET 8 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 8 (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 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

CreateHeader(String, String, Object, Boolean, String)

Source:
MessageHeader.cs
Source:
MessageHeader.cs

Creates a new message header with the specified data.

public static System.ServiceModel.Channels.MessageHeader CreateHeader (string name, string ns, object value, bool mustUnderstand, string actor);

Parameters

name
String

The local name of the header XML element.

ns
String

The namespace URI of the header XML element.

value
Object

The content of the header to be created.

mustUnderstand
Boolean

A value that indicates whether the header must be understood.

actor
String

The targeted recipient of the message header.

Returns

A new MessageHeader object with the specified data.

Applies to

.NET 8 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 8 (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 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

CreateHeader(String, String, Object, XmlObjectSerializer, Boolean)

Source:
MessageHeader.cs
Source:
MessageHeader.cs

Creates a new message header with the specified data.

public static System.ServiceModel.Channels.MessageHeader CreateHeader (string name, string ns, object value, System.Runtime.Serialization.XmlObjectSerializer serializer, bool mustUnderstand);

Parameters

name
String

The local name of the header XML element.

ns
String

The namespace URI of the header XML element.

value
Object

The content of the header to be created.

serializer
XmlObjectSerializer

An XmlObjectSerializer that is used to serialize the header.

mustUnderstand
Boolean

A value that indicates whether the header must be understood.

Returns

A new MessageHeader object with the specified data.

Applies to

.NET 8 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 8 (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 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

CreateHeader(String, String, Object, Boolean, String, Boolean)

Source:
MessageHeader.cs
Source:
MessageHeader.cs

Creates a new message header with the specified data.

public static System.ServiceModel.Channels.MessageHeader CreateHeader (string name, string ns, object value, bool mustUnderstand, string actor, bool relay);

Parameters

name
String

The local name of the header XML element.

ns
String

The namespace URI of the header XML element.

value
Object

The content of the header to be created.

mustUnderstand
Boolean

A value that indicates whether the header must be understood.

actor
String

The targeted recipient of the message header.

relay
Boolean

A value that indicates whether the header should be relayed.

Returns

A new MessageHeader object with the specified data.

Applies to

.NET 8 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 8 (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 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

CreateHeader(String, String, Object, XmlObjectSerializer, Boolean, String)

Source:
MessageHeader.cs
Source:
MessageHeader.cs

Creates a new message header with the specified data.

public static System.ServiceModel.Channels.MessageHeader CreateHeader (string name, string ns, object value, System.Runtime.Serialization.XmlObjectSerializer serializer, bool mustUnderstand, string actor);

Parameters

name
String

The local name of the header XML element.

ns
String

The namespace URI of the header XML element.

value
Object

The content of the header to be created.

serializer
XmlObjectSerializer

An XmlObjectSerializer that is used to serialize the header.

mustUnderstand
Boolean

A value that indicates whether the header must be understood.

actor
String

The targeted recipient of the message header.

Returns

A new MessageHeader object with the specified data.

Applies to

.NET 8 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 8 (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 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

CreateHeader(String, String, Object, XmlObjectSerializer, Boolean, String, Boolean)

Source:
MessageHeader.cs
Source:
MessageHeader.cs

Creates a new message header with the specified data.

public static System.ServiceModel.Channels.MessageHeader CreateHeader (string name, string ns, object value, System.Runtime.Serialization.XmlObjectSerializer serializer, bool mustUnderstand, string actor, bool relay);

Parameters

name
String

The local name of the header XML element.

ns
String

The namespace URI of the header XML element.

value
Object

The content of the header to be created.

serializer
XmlObjectSerializer

An XmlObjectSerializer that is used to serialize the header.

mustUnderstand
Boolean

A value that indicates whether the header must be understood.

actor
String

The targeted recipient of the message header.

relay
Boolean

A value that indicates whether the header should be relayed.

Returns

A new MessageHeader object with the specified data.

Applies to

.NET 8 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 8 (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 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0