November Happy Hour will be moved to Thursday December 5th.

Class ExtendedDataAnnotationsModelMetadataProvider

Extracts metadata from attributes for any given class. This can be used to create user interfaces for editing any given object.

Inheritance
System.Object
ExtendedDataAnnotationsModelMetadataProvider
Namespace: EPiServer.Shell.ObjectEditing
Assembly: EPiServer.Shell.dll
Version: 10.10.4
Syntax
public class ExtendedDataAnnotationsModelMetadataProvider : DataAnnotationsModelMetadataProvider

Constructors

ExtendedDataAnnotationsModelMetadataProvider()

Initializes a new instance of the ExtendedDataAnnotationsModelMetadataProvider class.

Declaration
[Obsolete("Use the parameterized constructor with the most parameters")]
public ExtendedDataAnnotationsModelMetadataProvider()

ExtendedDataAnnotationsModelMetadataProvider(LocalizationService)

Initializes a new instance of the ExtendedDataAnnotationsModelMetadataProvider class.

Declaration
[Obsolete("Use the parameterized constructor with the most parameters")]
public ExtendedDataAnnotationsModelMetadataProvider(LocalizationService localizationService)
Parameters
Type Name Description
LocalizationService localizationService

The localization service.

ExtendedDataAnnotationsModelMetadataProvider(LocalizationService, ServiceAccessor<HttpContextBase>)

Initializes a new instance of the ExtendedDataAnnotationsModelMetadataProvider class.

Declaration
public ExtendedDataAnnotationsModelMetadataProvider(LocalizationService localizationService, ServiceAccessor<HttpContextBase> httpContext)
Parameters
Type Name Description
LocalizationService localizationService

The localization service.

ServiceAccessor<System.Web.HttpContextBase> httpContext

Access to the current HTTP context

ExtendedDataAnnotationsModelMetadataProvider(LocalizationService, HttpContextBase)

Initializes a new instance of the ExtendedDataAnnotationsModelMetadataProvider class.

Declaration
[Obsolete("Use the parameterized constructor with the most parameters")]
public ExtendedDataAnnotationsModelMetadataProvider(LocalizationService localizationService, HttpContextBase httpContextBase)
Parameters
Type Name Description
LocalizationService localizationService

The localization service.

System.Web.HttpContextBase httpContextBase

HttpContextBase

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.

Extension Methods