Bewerken

Delen via


CorrelationProperty Class

Definition

Caution

The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*

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

public ref class CorrelationProperty
[System.Serializable]
public class CorrelationProperty
[System.Serializable]
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public class CorrelationProperty
[<System.Serializable>]
type CorrelationProperty = class
[<System.Serializable>]
[<System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")>]
type CorrelationProperty = class
Public Class CorrelationProperty
Inheritance
CorrelationProperty
Attributes

Examples

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;
' Create a new Correlation Property object
Dim correlationProperty As New CorrelationProperty("taskName", "reportBalance")
' Read the property name
Dim taskName As String = correlationProperty.Name
' Read the property value
Dim taskValue As Object = correlationProperty.Value

Remarks

Note

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.

Constructors

CorrelationProperty(String, Object)

Initializes a new instance of the CorrelationProperty class.

Properties

Name

Gets the name of the property used in the correlation set.

Value

Gets the value of the correlation set property.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to