Freigeben über


ContractBasedImportDefinition.RequiredMetadata Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets the metadata names of the export required by the import definition.

Namespace:  System.ComponentModel.Composition.Primitives
Assembly:  System.ComponentModel.Composition (in System.ComponentModel.Composition.dll)

Syntax

'Declaration
Public Overridable ReadOnly Property RequiredMetadata As IEnumerable(Of KeyValuePair(Of String, Type))
public virtual IEnumerable<KeyValuePair<string, Type>> RequiredMetadata { get; }

Property Value

Type: System.Collections.Generic.IEnumerable<KeyValuePair<String, Type>>
A collection of String objects that contain the metadata names of the Export objects required by the ContractBasedImportDefinition. The default is an empty IEnumerable<T> collection.

Remarks

Overrides of this property should never return nulla null reference (Nothing in Visual Basic) or return an IEnumerable<T> collection that contains an element that is nulla null reference (Nothing in Visual Basic). If the definition does not contain required metadata, return an empty IEnumerable<T> collection instead.

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.