CorrelationAliasAttribute 類別

定義

警告

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

當相互關聯值必須從不是由 CorrelationParameterAttribute 所指定的參數中取得時,則覆寫相互關聯參數值。 此類別無法獲得繼承。

public ref class CorrelationAliasAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Delegate | System.AttributeTargets.Event | System.AttributeTargets.Method, AllowMultiple=true)]
public sealed class CorrelationAliasAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Delegate | System.AttributeTargets.Event | System.AttributeTargets.Method, AllowMultiple=true)]
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public sealed class CorrelationAliasAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Delegate | System.AttributeTargets.Event | System.AttributeTargets.Method, AllowMultiple=true)>]
type CorrelationAliasAttribute = class
    inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Delegate | System.AttributeTargets.Event | System.AttributeTargets.Method, AllowMultiple=true)>]
[<System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")>]
type CorrelationAliasAttribute = class
    inherit Attribute
Public NotInheritable Class CorrelationAliasAttribute
Inherits Attribute
繼承
CorrelationAliasAttribute
屬性

範例

下列程式碼範例示範如何使用 CorrelationAliasAttribute 來覆寫 CorrelationParameterAttribute。 這個程式碼範例來自<CorrelatedLocalService SDK>範例。 如需詳細資訊,請參閱 相互關聯的本機服務範例

[ExternalDataExchange]
[CorrelationParameter("taskId")]
public interface ITaskService2
{
    [CorrelationInitializer]
    void CreateTask(string taskId, string assignee, string text);

    [CorrelationAlias("taskId", "e.Id")]
    event EventHandler<TaskEventArgs> TaskCompleted;
}

備註

注意

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

為了比對傳入訊息與適當的工作流程執行個體,訊息和工作流程執行個體必須共用索引鍵。 這個索引鍵稱做相互關聯集。 一般而言,這個索引鍵可以是單一值的相互關聯集。 這表示訊息中的某個 ID 欄位可與由排程執行個體所保有之相同型別的 ID 比對。

CorrelationAliasAttribute 會套用至資料交換介面上介面中的方法或事件。

建構函式

CorrelationAliasAttribute(String, String)
已淘汰.

初始化 CorrelationAliasAttribute 的新執行個體,其中包含的相互關聯名稱已有別名,且包含的路徑會連結至可找到的值。

屬性

Name
已淘汰.

取得已有別名之相互關聯參數的名稱。

Path
已淘汰.

取得參數內的路徑,可指定相互關聯值的位置。

TypeId
已淘汰.

在衍生類別中實作時,取得這個 Attribute 的唯一識別碼。

(繼承來源 Attribute)

方法

Equals(Object)
已淘汰.

傳回值,這個值指出此執行個體是否與指定的物件相等。

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

傳回這個執行個體的雜湊碼。

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

取得目前執行個體的 Type

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

在衍生類別中覆寫時,表示這個執行個體的值是衍生類別的預設值。

(繼承來源 Attribute)
Match(Object)
已淘汰.

在衍生類別中覆寫時,會傳回值,表示這個執行個體是否等於指定物件。

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

建立目前 Object 的淺層複製。

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

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

(繼承來源 Object)

明確介面實作

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)
已淘汰.

將一組名稱對應至一組對應的分派識別項 (Dispatch Identifier)。

(繼承來源 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)
已淘汰.

擷取物件的類型資訊,可以用來取得介面的類型資訊。

(繼承來源 Attribute)
_Attribute.GetTypeInfoCount(UInt32)
已淘汰.

擷取物件提供的類型資訊介面數目 (0 或 1)。

(繼承來源 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)
已淘汰.

提供物件所公開的屬性和方法的存取權。

(繼承來源 Attribute)

適用於