SaaS CMS has officially launched! Learn more now.

Interface IMetadataProvider

Implement this interface to be able to provide metadata for an entire class and it's sub properties.

Namespace: EPiServer.Shell.ObjectEditing
Assembly: EPiServer.Shell.dll
Version: 8.11.0
Syntax
public interface IMetadataProvider : IMetadataHandler

Methods

CreateMetadata(IEnumerable<Attribute>, Type, Func<Object>, Type, String)

Gets the metadata for the specified property.

Declaration
ExtendedMetadata 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
ExtendedMetadata

The metadata for the property.

GetMetadataForProperties(Object, Type)

Gets the metadata for the properties of a given type.

Declaration
IEnumerable<ExtendedMetadata> GetMetadataForProperties(object container, Type containerType)
Parameters
Type Name Description
System.Object container

The container.

System.Type containerType

Type of the container.

Returns
Type Description
System.Collections.Generic.IEnumerable<ExtendedMetadata>

The metadata for the properties of the type.