InstanceKey 類別

定義

代表執行個體索引鍵,並包含有與執行個體索引鍵相關聯的識別碼和中繼資料。Represents an instance key and contains an identifier and metadata associated with the instance key. 做為執行個體非唯一別名的執行個體索引鍵。An instance key acts as a non-unique alias for an instance.

public ref class InstanceKey
public class InstanceKey
[System.Runtime.Serialization.DataContract]
public class InstanceKey
type InstanceKey = class
[<System.Runtime.Serialization.DataContract>]
type InstanceKey = class
Public Class InstanceKey
繼承
InstanceKey
衍生
屬性

建構函式

InstanceKey(Guid)

使用與已傳遞的執行個體索引鍵相關聯的 GUID,初始化 InstanceKey 類別的執行個體。Initializes an instance of the InstanceKey class using the GUID associated with the instance key passed.

InstanceKey(Guid, IDictionary<XName,InstanceValue>)

使用與執行個體索引鍵相關聯的 GUID 和中繼資料,初始化 InstanceKey 類別的執行個體。Initializes an instance of the InstanceKey class using the GUID and metadata associated with the instance key.

屬性

InvalidKey

傳回無效的 InstanceKey 物件。Returns an invalid InstanceKey object. 無效的 InstanceKey 物件具有 Value 屬性的 Guid.Empty 值和 IsValid 屬性的 false 值。An invalid InstanceKey object has Guid.Empty value for the Value property and a false value for the IsValid property.

IsValid

取得值,這個值表示執行個體索引鍵是否有效。Gets a value that indicates whether the instance key is valid.

Metadata

取得包含與執行個體索引鍵相關聯之中繼資料的字典。Gets the dictionary that contains metadata associated with the instance key.

Value

取得與目前執行個體索引鍵相關聯的 GUID 值。Gets the GUID value associated with the current instance key.

方法

Equals(Object)

比較與目前物件相關聯的 GUID (儲存在 Value 屬性) 和與 InstanceKey 物件相關聯的 GUID。Compares the GUID associated with the current object (stored in the Value property) with the GUID associated with the InstanceKey object.

GetHashCode()

傳回目前 InstanceKey 物件之 GUID (儲存於 Value 屬性中) 的唯一雜湊程式碼。Returns a unique hash code for the current InstanceKey object's GUID (stored in the Value property).

GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於