MessageHeader.CreateHeader 方法

定义

创建新消息头。

重载

CreateHeader(String, String, Object)

创建具有指定数据的新消息头。

CreateHeader(String, String, Object, Boolean)

创建具有指定数据的新消息头。

CreateHeader(String, String, Object, XmlObjectSerializer)

使用 XmlFormatter 从要序列化的对象创建标头。

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

创建具有指定数据的新消息头。

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

创建具有指定数据的新消息头。

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

创建具有指定数据的新消息头。

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

创建具有指定数据的新消息头。

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

创建具有指定数据的新消息头。

CreateHeader(String, String, Object)

Source:
MessageHeader.cs
Source:
MessageHeader.cs
Source:
MessageHeader.cs

创建具有指定数据的新消息头。

public:
 static System::ServiceModel::Channels::MessageHeader ^ CreateHeader(System::String ^ name, System::String ^ ns, System::Object ^ value);
public static System.ServiceModel.Channels.MessageHeader CreateHeader (string name, string ns, object value);
static member CreateHeader : string * string * obj -> System.ServiceModel.Channels.MessageHeader
Public Shared Function CreateHeader (name As String, ns As String, value As Object) As MessageHeader

参数

name
String

标头 XML 元素的本地名称。

ns
String

标头 XML 元素的命名空间 URI。

value
Object

要创建的标头的内容。

返回

一个具有指定数据的新 MessageHeader 对象。

适用于

CreateHeader(String, String, Object, Boolean)

Source:
MessageHeader.cs
Source:
MessageHeader.cs
Source:
MessageHeader.cs

创建具有指定数据的新消息头。

public:
 static System::ServiceModel::Channels::MessageHeader ^ CreateHeader(System::String ^ name, System::String ^ ns, System::Object ^ value, bool mustUnderstand);
public static System.ServiceModel.Channels.MessageHeader CreateHeader (string name, string ns, object value, bool mustUnderstand);
static member CreateHeader : string * string * obj * bool -> System.ServiceModel.Channels.MessageHeader
Public Shared Function CreateHeader (name As String, ns As String, value As Object, mustUnderstand As Boolean) As MessageHeader

参数

name
String

标头 XML 元素的本地名称。

ns
String

标头 XML 元素的命名空间 URI。

value
Object

要创建的标头的内容。

mustUnderstand
Boolean

一个值,指示是否必须理解该标头。

返回

一个具有指定数据的新 MessageHeader 对象。

适用于

CreateHeader(String, String, Object, XmlObjectSerializer)

Source:
MessageHeader.cs
Source:
MessageHeader.cs
Source:
MessageHeader.cs

使用 XmlFormatter 从要序列化的对象创建标头。

public:
 static System::ServiceModel::Channels::MessageHeader ^ CreateHeader(System::String ^ name, System::String ^ ns, System::Object ^ value, System::Runtime::Serialization::XmlObjectSerializer ^ serializer);
public static System.ServiceModel.Channels.MessageHeader CreateHeader (string name, string ns, object value, System.Runtime.Serialization.XmlObjectSerializer serializer);
static member CreateHeader : string * string * obj * System.Runtime.Serialization.XmlObjectSerializer -> System.ServiceModel.Channels.MessageHeader
Public Shared Function CreateHeader (name As String, ns As String, value As Object, serializer As XmlObjectSerializer) As MessageHeader

参数

name
String

标头 XML 元素的本地名称。

ns
String

标头 XML 元素的命名空间 URI。

value
Object

要创建的标头的内容。

serializer
XmlObjectSerializer

一个 XmlObjectSerializer,用于序列化标头。

返回

一个具有指定数据的新 MessageHeader 对象。

适用于

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

Source:
MessageHeader.cs
Source:
MessageHeader.cs
Source:
MessageHeader.cs

创建具有指定数据的新消息头。

public:
 static System::ServiceModel::Channels::MessageHeader ^ CreateHeader(System::String ^ name, System::String ^ ns, System::Object ^ value, bool mustUnderstand, System::String ^ actor);
public static System.ServiceModel.Channels.MessageHeader CreateHeader (string name, string ns, object value, bool mustUnderstand, string actor);
static member CreateHeader : string * string * obj * bool * string -> System.ServiceModel.Channels.MessageHeader
Public Shared Function CreateHeader (name As String, ns As String, value As Object, mustUnderstand As Boolean, actor As String) As MessageHeader

参数

name
String

标头 XML 元素的本地名称。

ns
String

标头 XML 元素的命名空间 URI。

value
Object

要创建的标头的内容。

mustUnderstand
Boolean

一个值,指示是否必须理解该标头。

actor
String

消息头的目标接收方。

返回

一个具有指定数据的新 MessageHeader 对象。

适用于

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

Source:
MessageHeader.cs
Source:
MessageHeader.cs
Source:
MessageHeader.cs

创建具有指定数据的新消息头。

public:
 static System::ServiceModel::Channels::MessageHeader ^ CreateHeader(System::String ^ name, System::String ^ ns, System::Object ^ value, System::Runtime::Serialization::XmlObjectSerializer ^ serializer, bool mustUnderstand);
public static System.ServiceModel.Channels.MessageHeader CreateHeader (string name, string ns, object value, System.Runtime.Serialization.XmlObjectSerializer serializer, bool mustUnderstand);
static member CreateHeader : string * string * obj * System.Runtime.Serialization.XmlObjectSerializer * bool -> System.ServiceModel.Channels.MessageHeader
Public Shared Function CreateHeader (name As String, ns As String, value As Object, serializer As XmlObjectSerializer, mustUnderstand As Boolean) As MessageHeader

参数

name
String

标头 XML 元素的本地名称。

ns
String

标头 XML 元素的命名空间 URI。

value
Object

要创建的标头的内容。

serializer
XmlObjectSerializer

一个 XmlObjectSerializer,用于序列化标头。

mustUnderstand
Boolean

一个值,指示是否必须理解该标头。

返回

一个具有指定数据的新 MessageHeader 对象。

适用于

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

Source:
MessageHeader.cs
Source:
MessageHeader.cs
Source:
MessageHeader.cs

创建具有指定数据的新消息头。

public:
 static System::ServiceModel::Channels::MessageHeader ^ CreateHeader(System::String ^ name, System::String ^ ns, System::Object ^ value, bool mustUnderstand, System::String ^ actor, bool relay);
public static System.ServiceModel.Channels.MessageHeader CreateHeader (string name, string ns, object value, bool mustUnderstand, string actor, bool relay);
static member CreateHeader : string * string * obj * bool * string * bool -> System.ServiceModel.Channels.MessageHeader
Public Shared Function CreateHeader (name As String, ns As String, value As Object, mustUnderstand As Boolean, actor As String, relay As Boolean) As MessageHeader

参数

name
String

标头 XML 元素的本地名称。

ns
String

标头 XML 元素的命名空间 URI。

value
Object

要创建的标头的内容。

mustUnderstand
Boolean

一个值,指示是否必须理解该标头。

actor
String

消息头的目标接收方。

relay
Boolean

一个值,指示是否应该中继标头。

返回

一个具有指定数据的新 MessageHeader 对象。

适用于

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

Source:
MessageHeader.cs
Source:
MessageHeader.cs
Source:
MessageHeader.cs

创建具有指定数据的新消息头。

public:
 static System::ServiceModel::Channels::MessageHeader ^ CreateHeader(System::String ^ name, System::String ^ ns, System::Object ^ value, System::Runtime::Serialization::XmlObjectSerializer ^ serializer, bool mustUnderstand, System::String ^ actor);
public static System.ServiceModel.Channels.MessageHeader CreateHeader (string name, string ns, object value, System.Runtime.Serialization.XmlObjectSerializer serializer, bool mustUnderstand, string actor);
static member CreateHeader : string * string * obj * System.Runtime.Serialization.XmlObjectSerializer * bool * string -> System.ServiceModel.Channels.MessageHeader
Public Shared Function CreateHeader (name As String, ns As String, value As Object, serializer As XmlObjectSerializer, mustUnderstand As Boolean, actor As String) As MessageHeader

参数

name
String

标头 XML 元素的本地名称。

ns
String

标头 XML 元素的命名空间 URI。

value
Object

要创建的标头的内容。

serializer
XmlObjectSerializer

一个 XmlObjectSerializer,用于序列化标头。

mustUnderstand
Boolean

一个值,指示是否必须理解该标头。

actor
String

消息头的目标接收方。

返回

一个具有指定数据的新 MessageHeader 对象。

适用于

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

Source:
MessageHeader.cs
Source:
MessageHeader.cs
Source:
MessageHeader.cs

创建具有指定数据的新消息头。

public:
 static System::ServiceModel::Channels::MessageHeader ^ CreateHeader(System::String ^ name, System::String ^ ns, System::Object ^ value, System::Runtime::Serialization::XmlObjectSerializer ^ serializer, bool mustUnderstand, System::String ^ actor, bool relay);
public static System.ServiceModel.Channels.MessageHeader CreateHeader (string name, string ns, object value, System.Runtime.Serialization.XmlObjectSerializer serializer, bool mustUnderstand, string actor, bool relay);
static member CreateHeader : string * string * obj * System.Runtime.Serialization.XmlObjectSerializer * bool * string * bool -> System.ServiceModel.Channels.MessageHeader
Public Shared Function CreateHeader (name As String, ns As String, value As Object, serializer As XmlObjectSerializer, mustUnderstand As Boolean, actor As String, relay As Boolean) As MessageHeader

参数

name
String

标头 XML 元素的本地名称。

ns
String

标头 XML 元素的命名空间 URI。

value
Object

要创建的标头的内容。

serializer
XmlObjectSerializer

一个 XmlObjectSerializer,用于序列化标头。

mustUnderstand
Boolean

一个值,指示是否必须理解该标头。

actor
String

消息头的目标接收方。

relay
Boolean

一个值,指示是否应该中继标头。

返回

一个具有指定数据的新 MessageHeader 对象。

适用于