Uređivanje

Dijeli putem


ReceiveActivity.GetRootContext(Activity) Method

Definition

Static method that returns context information for the root context associated with a given activity instance. Context information is used for communication between a host application and the workflow service.

public:
 static System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ GetRootContext(System::Workflow::ComponentModel::Activity ^ activity);
public static System.Collections.Generic.IDictionary<string,string> GetRootContext (System.Workflow.ComponentModel.Activity activity);
static member GetRootContext : System.Workflow.ComponentModel.Activity -> System.Collections.Generic.IDictionary<string, string>
Public Shared Function GetRootContext (activity As Activity) As IDictionary(Of String, String)

Parameters

activity
Activity

The child activity instance.

Returns

A dictionary-based collection that contains XmlQualifiedName keys and their associated String values that represent context information for a root context. Barring custom instance creation logic, the message that triggers creation of a new instance is received in the root context.

Examples

The following example shows how to use the GetRootContext method.

ReceiveActivity receiveActivity1 = new ReceiveActivity();
Dictionary<XmlQualifiedName, String> context =
    (Dictionary<XmlQualifiedName, String>)ReceiveActivity.GetRootContext(receiveActivity1);

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