ReceiveActivity.Context 属性

定义

获取此活动的上下文信息。

public:
 property System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ Context { System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Collections.Generic.IDictionary<string,string> Context { get; }
[<System.ComponentModel.Browsable(false)>]
member this.Context : System.Collections.Generic.IDictionary<string, string>
Public ReadOnly Property Context As IDictionary(Of String, String)

属性值

一个 IDictionary<TKey,TValue> 对象,它包含此活动的上下文信息。

属性

示例

下面的示例演示如何访问 Context 属性。

// Create EndpointAddress from Uri and ReceiveActivity
static public EndpointAddress CreateEndpointAddress(string uri, ReceiveActivity receiveActivity)
{
    return CreateEndpointAddress(uri, receiveActivity.Context);
}

注解

上下文信息用于客户端与服务(将与客户端通信)之间的通信并包括关联标识之类的内容。

适用于