แก้ไข

แชร์ผ่าน


SendActivity.Context Property

Definition

Returns a dictionary that contains the context used for communication between the client and the service it is communicating with, including such things as identification for correlation.

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

Property Value

A dictionary-based collection that contains XmlQualifiedName keys and their associated String values.

Attributes

Examples

The following example shows how to access the Context property. This example was adapted from the CalculatorClient SDK sample.

static public void ApplyContext(SendActivity activity, IDictionary<string, string> context)
{
    if (activity.ExecutionStatus == ActivityExecutionStatus.Initialized)
    {
        activity.Context = context;
    }
}

Remarks

Context information is used for communication between the client and the service it is communicating with and includes such things as identification for correlation.

Applies to