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>

适用于