Table of Contents

Class MetadataView

Namespace
Microsoft.VisualStudio.Composition
Assembly
Microsoft.VisualStudio.Composition.dll

Provides helper methods for concrete metadata view implementations that are referenced by MetadataViewImplementationAttribute.

public abstract class MetadataView
Inheritance
MetadataView
Inherited Members

Constructors

MetadataView()

Initializes a new instance of the MetadataView class.

protected MetadataView()

MetadataView(IDictionary<string, object>)

Initializes a new instance of the MetadataView class from a metadata dictionary, for compatibility with MEFv1 metadata view activation.

protected MetadataView(IDictionary<string, object> metadata)

Parameters

metadata IDictionary<string, object>

The metadata dictionary.

Methods

GetMetadata<T>(string)

Gets a metadata value using the calling property's name as the metadata key.

protected T GetMetadata<T>(string propertyName = "")

Parameters

propertyName string

The name of the property whose metadata should be read.

Returns

T

The metadata value.

Type Parameters

T

The expected metadata value type.