ComposablePart.Metadata 屬性

定義

取得 ComposablePart 物件的中繼資料。

public:
 virtual property System::Collections::Generic::IDictionary<System::String ^, System::Object ^> ^ Metadata { System::Collections::Generic::IDictionary<System::String ^, System::Object ^> ^ get(); };
public virtual System.Collections.Generic.IDictionary<string,object> Metadata { get; }
public virtual System.Collections.Generic.IDictionary<string,object?> Metadata { get; }
member this.Metadata : System.Collections.Generic.IDictionary<string, obj>
Public Overridable ReadOnly Property Metadata As IDictionary(Of String, Object)

屬性值

ComposablePart 物件的中繼資料。 預設為空白、唯讀的 IDictionary<TKey,TValue> 物件。

例外狀況

ComposablePart 物件已經處置。

備註

ComposablePart如果對像是從 ComposablePartDefinition 物件建立的,這個屬性應該會傳回 的結果Metadata

此屬性的覆寫應該傳回具有區分大小寫、非語言比較子的唯讀 IDictionary<TKey,TValue> 物件,例如 Ordinal,而且絕對不會傳回 nullComposablePart如果 不包含中繼資料,請改為傳回空IDictionary<TKey,TValue>的 。

適用於