CorrelationDataMessageProperty.AddData(Message, String, Func<String>) 方法
定义
将相关数据添加到指定的消息。Adds correlation data to the specified message.
public:
static void AddData(System::ServiceModel::Channels::Message ^ message, System::String ^ name, Func<System::String ^> ^ dataProvider);
public static void AddData (System.ServiceModel.Channels.Message message, string name, Func<string> dataProvider);
static member AddData : System.ServiceModel.Channels.Message * string * Func<string> -> unit
Public Shared Sub AddData (message As Message, name As String, dataProvider As Func(Of String))
参数
- message
- Message
要修改的消息。The message to modify.
- name
- String
相关数据提供程序的名称。The name of the correlation data provider.
注解
如果消息具有 CorrelationDataMessageProperty,则将相关数据添加到 CorrelationDataMessageProperty;否则,将添加一个包含相关数据的新的 CorrelationDataMessageProperty。If the message has a CorrelationDataMessageProperty then the correlation data is added to the CorrelationDataMessageProperty; otherwise, a new CorrelationDataMessageProperty is added that includes the correlation data.