ComposablePart.Metadata 属性

定义

获取 ComposablePart 对象的元数据。Gets the metadata of the ComposablePart object.

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)

属性值

IDictionary<String,Object>

ComposablePart 对象的元数据。The metadata of the ComposablePart object. 默认为一个空的只读 IDictionary<TKey,TValue> 对象。The default is an empty, read-only IDictionary<TKey,TValue> object.

例外

ComposablePart 对象已被释放。The ComposablePart object has been disposed of.

注解

如果 ComposablePart 对象是从对象创建的 ComposablePartDefinition ,则此属性应返回的结果 MetadataIf the ComposablePart object was created from a ComposablePartDefinition object, this property should return the result of Metadata.

此属性的重写应返回 IDictionary<TKey,TValue> 具有区分大小写的非语言比较器的只读对象(如 Ordinal ),并且永远不会返回 nullOverrides of this property should return a read-only IDictionary<TKey,TValue> object with a case-sensitive, non-linguistic comparer, such as Ordinal, and should never return null. 如果不 ComposablePart 包含元数据,则改为返回空 IDictionary<TKey,TValue>If the ComposablePart does not contain metadata, return an empty IDictionary<TKey,TValue> instead.

适用于