Class ExtensibleMetadataProvider
Extracts metadata for classes and properties and applies information from system wide editor extenders registered in MetadataHandlerRegistry.
Namespace: EPiServer.Shell.ObjectEditing
Assembly: EPiServer.Shell.dll
Version: 10.10.4Syntax
[ServiceConfiguration(typeof(ExtensibleMetadataProvider), Lifecycle = ServiceInstanceScope.Singleton)]
public class ExtensibleMetadataProvider : ExtendedDataAnnotationsModelMetadataProvider
Constructors
ExtensibleMetadataProvider()
Initializes a new instance of the ExtensibleMetadataProvider class.
Declaration
[Obsolete("Use the parameterized constructor with the most parameters")]
public ExtensibleMetadataProvider()
ExtensibleMetadataProvider(MetadataHandlerRegistry)
Initializes a new instance of the ExtensibleMetadataProvider class.
Declaration
[Obsolete("Use the parameterized constructor with the most parameters")]
public ExtensibleMetadataProvider(MetadataHandlerRegistry metadataHandlerRegistry)
Parameters
Type | Name | Description |
---|---|---|
MetadataHandlerRegistry | metadataHandlerRegistry | The metadata registry. |
ExtensibleMetadataProvider(MetadataHandlerRegistry, LocalizationService)
Initializes a new instance of the ExtensibleMetadataProvider class.
Declaration
[Obsolete("Use the parameterized constructor with the most parameters")]
public ExtensibleMetadataProvider(MetadataHandlerRegistry metadataHandlerRegistry, LocalizationService localizationService)
Parameters
Type | Name | Description |
---|---|---|
MetadataHandlerRegistry | metadataHandlerRegistry | The metadata registry. |
LocalizationService | localizationService | The localization service. |
ExtensibleMetadataProvider(MetadataHandlerRegistry, LocalizationService, ServiceAccessor<HttpContextBase>)
Initializes a new instance of the ExtensibleMetadataProvider class.
Declaration
public ExtensibleMetadataProvider(MetadataHandlerRegistry metadataHandlerRegistry, LocalizationService localizationService, ServiceAccessor<HttpContextBase> httpContext)
Parameters
Type | Name | Description |
---|---|---|
MetadataHandlerRegistry | metadataHandlerRegistry | The metadata registry. |
LocalizationService | localizationService | The localization service. |
ServiceAccessor<System.Web.HttpContextBase> | httpContext | Access to the current HTTP context |
ExtensibleMetadataProvider(MetadataHandlerRegistry, LocalizationService, HttpContextBase)
Initializes a new instance of the ExtensibleMetadataProvider class.
Declaration
[Obsolete("Use the parameterized constructor with the most parameters")]
public ExtensibleMetadataProvider(MetadataHandlerRegistry metadataHandlerRegistry, LocalizationService localizationService, HttpContextBase httpContextBase)
Parameters
Type | Name | Description |
---|---|---|
MetadataHandlerRegistry | metadataHandlerRegistry | The metadata registry. |
LocalizationService | localizationService | The localization service. |
System.Web.HttpContextBase | httpContextBase | HttpContextBase |
Properties
MetadataHandlerRegistry
Gets the metadata handler registry.
Declaration
public virtual MetadataHandlerRegistry MetadataHandlerRegistry { get; }
Property Value
Type | Description |
---|---|
MetadataHandlerRegistry | The metadata handler registry. |
Methods
CreateMetadata(IEnumerable<Attribute>, Type, Func<Object>, Type, String)
Gets the metadata for the specified property.
Declaration
protected override ModelMetadata CreateMetadata(IEnumerable<Attribute> attributes, Type containerType, Func<object> modelAccessor, Type modelType, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Attribute> | attributes | The attributes. |
System.Type | containerType | The type of the container. |
System.Func<System.Object> | modelAccessor | The model accessor. |
System.Type | modelType | The type of the model. |
System.String | propertyName | The name of the property. |
Returns
Type | Description |
---|---|
System.Web.Mvc.ModelMetadata | The metadata for the property. |
Overrides
GetMetadataForProperties(ExtendedMetadata, Object, Type, IMetadataProvider)
Gets the metadata for properties.
Declaration
public virtual IEnumerable<ExtendedMetadata> GetMetadataForProperties(ExtendedMetadata parent, object container, Type containerType, IMetadataProvider customProvider)
Parameters
Type | Name | Description |
---|---|---|
ExtendedMetadata | parent | The parent metadata. |
System.Object | container | The container. |
System.Type | containerType | Type of the container. |
IMetadataProvider | customProvider | The custom provider. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ExtendedMetadata> | The metadata for the properties of a given object/type. |