This documentation is archived and is not being maintained.

ReceiveActivity.Context Property

Gets the context information for this activity.

Namespace:  System.Workflow.Activities
Assembly:  System.WorkflowServices (in System.WorkflowServices.dll)

[BrowsableAttribute(false)]
public IDictionary<string, string> Context { get; }

Property Value

Type: System.Collections.Generic.IDictionary<String, String>
A IDictionary<TKey, TValue> object that contains context information for this activity.

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

The following example shows how to access the Context property.

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

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5
Show: