Export (0) Print
Expand All

CorrelationProperty Class

Note: This API is now obsolete.

Represents a name and value pair used to correlate messages to specific receiving activities.


Namespace:  System.Workflow.Runtime
Assembly:  System.Workflow.Runtime (in System.Workflow.Runtime.dll)

[ObsoleteAttribute("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public class CorrelationProperty

The CorrelationProperty type exposes the following members.

Public methodCorrelationPropertyInitializes a new instance of the CorrelationProperty class.

Public propertyNameGets the name of the property used in the correlation set.
Public propertyValueGets the value of the correlation set property.

Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)


This material discusses types and namespaces that are obsolete. For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

CorrelationProperty classes are defined as ActivityBind properties of Workflow Connection Service activities. By default, these properties are bound to variables declared at the root workflow activity. For dynamic activities such as ReplicatorActivity and ConditionedActivityGroup each of its children cannot share a universal CorrelationProperty object. Consider the scenario where each task inside a ReplicatorActivity has to manage its own conversation. The child activities inside the ReplicatorActivity requires a CorrelationProperty instance unique per execution context, or per task. In order to accomplish this, you have to define a custom activity that has a CorrelationProperty instance property and the Workflow Connection Services activities have to bind to this property.

The following example demonstrates creating a correlation property object, and accessing the Name and Value properties.

// Create a new Correlation Property object
CorrelationProperty correlationProperty = new CorrelationProperty("taskName", "reportBalance");
// Read the property name
String taskName = correlationProperty.Name;
// Read the property value
Object taskValue = correlationProperty.Value;

.NET Framework

Supported in: 4, 3.5, 3.0
Obsolete (compiler warning) in 4.6
Obsolete (compiler warning) in 4.6
Obsolete (compiler warning) in 4.5
Obsolete (compiler warning) in 4.5.1
Obsolete (compiler warning) in 4.5.2

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2015 Microsoft