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
metadataIDictionary<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
propertyNamestringThe name of the property whose metadata should be read.
Returns
- T
The metadata value.
Type Parameters
TThe expected metadata value type.