CorrelationProperty 類別

定義

警告

The System.Workflow.* types are deprecated. Instead, please use the new types from System.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
繼承
CorrelationProperty
屬性

範例

下列範例將示範建立相互關聯屬性物件與存取 Name 和 Value 屬性。

// 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

備註

注意

此資料討論已被汰換的類型及命名空間。 如需詳細資訊,請參閱 Windows Workflow Foundation 4.5 中即將淘汰的類型

CorrelationProperty 類別定義為工作流程連線服務活動的 ActivityBind 屬性。 根據預設,這些屬性繫結到在根工作流程活動宣告的變數。 至於 ReplicatorActivityConditionedActivityGroup 等動態活動,活動中的每個子系都不能共用通用的 CorrelationProperty 物件。 請考量在 ReplicatorActivity 中的每個工作必須管理自己的交談的情況。 ReplicatorActivity 內的子活動需要依照執行內容或工作的唯一 CorrelationProperty 執行個體。 為了達到這個目的,您必須定義有 CorrelationProperty 執行個體屬性的自訂活動,而且工作流程連線服務活動必須繫結到此屬性。

建構函式

CorrelationProperty(String, Object)
已淘汰.

初始化 CorrelationProperty 類別的新執行個體。

屬性

Name
已淘汰.

取得在相互關聯集中使用的屬性名稱。

Value
已淘汰.

取得相互關聯集屬性的值。

方法

Equals(Object)
已淘汰.

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()
已淘汰.

做為預設雜湊函式。

(繼承來源 Object)
GetType()
已淘汰.

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()
已淘汰.

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()
已淘汰.

傳回代表目前物件的字串。

(繼承來源 Object)

適用於