MessageHeader.CreateHeader Method (String, String, Object, XmlObjectSerializer, Boolean, String, Boolean)

 

Creates a new message header with the specified data.

Namespace:   System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public static MessageHeader CreateHeader(
	string name,
	string ns,
	object value,
	XmlObjectSerializer serializer,
	bool mustUnderstand,
	string actor,
	bool relay
)

Parameters

name
Type: System.String

The local name of the header XML element.

ns
Type: System.String

The namespace URI of the header XML element.

value
Type: System.Object

The content of the header to be created.

serializer
Type: System.Runtime.Serialization.XmlObjectSerializer

An XmlObjectSerializer that is used to serialize the header.

mustUnderstand
Type: System.Boolean

A value that indicates whether the header must be understood.

actor
Type: System.String

The targeted recipient of the message header.

relay
Type: System.Boolean

A value that indicates whether the header should be relayed.

Return Value

Type: System.ServiceModel.Channels.MessageHeader

A new MessageHeader object with the specified data.

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: