Class ExtendedMetadata
Provides metadata for a given type or property.
Inheritance
Namespace: EPiServer.Shell.ObjectEditing
Assembly: EPiServer.Shell.dll
Version: 9.12.2Syntax
public class ExtendedMetadata : DataAnnotationsModelMetadata
Constructors
ExtendedMetadata(Type, Func<Object>, Type, String)
Initializes a new instance of the ExtendedMetadata class.
Declaration
[Obsolete("Use the parameterized constructor with the most parameters")]
public ExtendedMetadata(Type containerType, Func<object> modelAccessor, Type modelType, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.Type | containerType | Type of the container. |
System.Func<System.Object> | modelAccessor | The model accessor. |
System.Type | modelType | Type of the model. |
System.String | propertyName | Name of the property. |
ExtendedMetadata(Type, Func<Object>, Type, String, DisplayColumnAttribute, ExtendedDataAnnotationsModelMetadataProvider)
Initializes a new instance of the ExtendedMetadata class.
Declaration
[Obsolete("Use the parameterized constructor with the most parameters")]
public ExtendedMetadata(Type containerType, Func<object> modelAccessor, Type modelType, string propertyName, DisplayColumnAttribute displayColumnAttribute, ExtendedDataAnnotationsModelMetadataProvider provider)
Parameters
Type | Name | Description |
---|---|---|
System.Type | containerType | Type of the container. |
System.Func<System.Object> | modelAccessor | The model accessor. |
System.Type | modelType | Type of the model. |
System.String | propertyName | Name of the property. |
System.ComponentModel.DataAnnotations.DisplayColumnAttribute | displayColumnAttribute | The display column attribute. |
ExtendedDataAnnotationsModelMetadataProvider | provider | The provider. |
ExtendedMetadata(Type, Func<Object>, Type, String, DisplayColumnAttribute, ExtendedDataAnnotationsModelMetadataProvider, LocalizationService)
Initializes a new instance of the ExtendedMetadata class.
Declaration
[Obsolete("Use the parameterized constructor with the most parameters")]
public ExtendedMetadata(Type containerType, Func<object> modelAccessor, Type modelType, string propertyName, DisplayColumnAttribute displayColumnAttribute, ExtendedDataAnnotationsModelMetadataProvider provider, LocalizationService localizationService)
Parameters
Type | Name | Description |
---|---|---|
System.Type | containerType | Type of the container. |
System.Func<System.Object> | modelAccessor | The model accessor. |
System.Type | modelType | Type of the model. |
System.String | propertyName | Name of the property. |
System.ComponentModel.DataAnnotations.DisplayColumnAttribute | displayColumnAttribute | The display column attribute. |
ExtendedDataAnnotationsModelMetadataProvider | provider | The provider. |
LocalizationService | localizationService | The localization service. |
ExtendedMetadata(Type, Func<Object>, Type, String, DisplayColumnAttribute, ExtendedDataAnnotationsModelMetadataProvider, LocalizationService, HttpContextBase)
Initializes a new instance of the ExtendedMetadata class.
Declaration
public ExtendedMetadata(Type containerType, Func<object> modelAccessor, Type modelType, string propertyName, DisplayColumnAttribute displayColumnAttribute, ExtendedDataAnnotationsModelMetadataProvider provider, LocalizationService localizationService, HttpContextBase httpContextBase)
Parameters
Type | Name | Description |
---|---|---|
System.Type | containerType | Type of the container. |
System.Func<System.Object> | modelAccessor | The model accessor. |
System.Type | modelType | Type of the model. |
System.String | propertyName | Name of the property. |
System.ComponentModel.DataAnnotations.DisplayColumnAttribute | displayColumnAttribute | The display column attribute. |
ExtendedDataAnnotationsModelMetadataProvider | provider | The provider. |
LocalizationService | localizationService | The localization service. |
System.Web.HttpContextBase | httpContextBase | HttpContextBase |
Properties
Attributes
Gets or sets the attributes.
Declaration
public IEnumerable<Attribute> Attributes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Attribute> |
ClientEditingClass
Gets or sets the client editing class.
Declaration
public string ClientEditingClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client editing class. |
ClientEditingPackage
Gets or sets the client editing package.
Declaration
public string ClientEditingPackage { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client editing package. |
CustomEditorSettings
Gets or sets the custom editor settings.
Declaration
public IDictionary<string, object> CustomEditorSettings { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | The custom editor settings. |
Remarks
This might include information about custom editor wrappers.
CustomMetadataProvider
Gets or sets the custom metadata provider.
Declaration
public IMetadataProvider CustomMetadataProvider { get; set; }
Property Value
Type | Description |
---|---|
IMetadataProvider | The custom metadata provider. |
DefaultValue
Gets or sets the default value.
Declaration
[Obsolete("This property is obsolete. Use InitialValue instead.", false)]
public object DefaultValue { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The default value. |
EditorConfiguration
Gets or sets the editor configuraion.
Declaration
public IDictionary<string, object> EditorConfiguration { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | The editor configuraion. |
GroupName
Gets or sets the name of the group.
Declaration
public string GroupName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the group. |
GroupSettings
Gets or sets the GroupSettings information for the current property.
Declaration
public GroupSettings GroupSettings { get; set; }
Property Value
Type | Description |
---|---|
GroupSettings | The group settings. |
Remarks
This can only be defined on property level. If several properties specify group settings for the same group an exception will be thrown.
InitialValue
Gets or sets the initial value.
Declaration
public object InitialValue { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The initial value. |
LayoutClass
Gets or sets the layout class.
Declaration
public string LayoutClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | The layout class. |
MappedProperties
Gets the mappings between property names.
Declaration
public IEnumerable<PropertyMapping> MappedProperties { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<PropertyMapping> |
OverlayConfiguration
Gets or sets the configuration data for the overlay.
Declaration
public IDictionary<string, object> OverlayConfiguration { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | The overlay configuraion. |
Parent
Gets or sets the Parent metadata.
Declaration
public ExtendedMetadata Parent { get; set; }
Property Value
Type | Description |
---|---|
ExtendedMetadata | The Parent. |
Properties
Gets a collection of model metadata objects that describe the properties of the model.
Declaration
public override IEnumerable<ModelMetadata> Properties { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Web.Mvc.ModelMetadata> |
SelectionFactoryType
Gets or sets the type of the selection factory.
Declaration
public Type SelectionFactoryType { get; set; }
Property Value
Type | Description |
---|---|
System.Type | The type of the selection factory. |
UIHint
Gets or sets the hint which is used to find a specific metadata handler for this type and hint.
Declaration
public string UIHint { get; set; }
Property Value
Type | Description |
---|---|
System.String | The hint. |
Methods
GetEditorSettings(LocalizationService)
Generate widget setting string
Declaration
public Dictionary<string, object> GetEditorSettings(LocalizationService localizationService)
Parameters
Type | Name | Description |
---|---|---|
LocalizationService | localizationService |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> | Widget setting string |
InitializeFromAttributes(IEnumerable<Attribute>)
Initializes metadata values from data annotation attributes.
Declaration
public virtual void InitializeFromAttributes(IEnumerable<Attribute> attributes)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Attribute> | attributes | The attributes. |
ReadSettingsFromClientSideEditorAttribute(ClientEditorAttribute)
Reads the settings from client side editor attribute.
Declaration
protected virtual void ReadSettingsFromClientSideEditorAttribute(ClientEditorAttribute editorAttribute)
Parameters
Type | Name | Description |
---|---|---|
ClientEditorAttribute | editorAttribute | The editor attribute. |
ReadSettingsFromDataTypeAttribute(DataTypeAttribute)
Reads the settings from data type attribute.
Declaration
protected virtual void ReadSettingsFromDataTypeAttribute(DataTypeAttribute attribute)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.DataAnnotations.DataTypeAttribute | attribute | The attribute. |
ReadSettingsFromDisplayAttributes(IEnumerable<Attribute>)
Reads the settings from display attribute.
Declaration
protected virtual void ReadSettingsFromDisplayAttributes(IEnumerable<Attribute> attributes)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Attribute> | attributes | The attributes. |
ReadSettingsFromDisplayFormatAttribute(DisplayFormatAttribute, DataTypeAttribute)
Reads the settings from display format attribute.
Declaration
protected virtual void ReadSettingsFromDisplayFormatAttribute(DisplayFormatAttribute displayFormatAttribute, DataTypeAttribute dataTypeAttribute)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.DataAnnotations.DisplayFormatAttribute | displayFormatAttribute | The display format attribute. |
System.ComponentModel.DataAnnotations.DataTypeAttribute | dataTypeAttribute | The data type attribute. |
ReadSettingsFromEditableAttributes(IEnumerable<Attribute>)
Reads the settings from editable attribute.
Declaration
protected virtual void ReadSettingsFromEditableAttributes(IEnumerable<Attribute> attributes)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Attribute> | attributes | The attributes. |
ReadSettingsFromEditorDescriptorAttribute(EditorDescriptorAttribute)
Reads the settings from editor descriptor attribute.
Declaration
protected virtual void ReadSettingsFromEditorDescriptorAttribute(EditorDescriptorAttribute editorDescriptorAttribute)
Parameters
Type | Name | Description |
---|---|---|
EditorDescriptorAttribute | editorDescriptorAttribute |
ReadSettingsFromGroupSettingsAttribute(GroupSettingsAttribute)
Reads the settings from group settings attribute.
Declaration
protected void ReadSettingsFromGroupSettingsAttribute(GroupSettingsAttribute groupSettingsAttribute)
Parameters
Type | Name | Description |
---|---|---|
GroupSettingsAttribute | groupSettingsAttribute | The group settings attribute. |
ReadSettingsFromHiddenInputAttribute(HiddenInputAttribute)
Extracts the settings from hidden input attribute.
Declaration
protected virtual void ReadSettingsFromHiddenInputAttribute(HiddenInputAttribute hiddenInputAttribute)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HiddenInputAttribute | hiddenInputAttribute | The hidden input attribute. |
ReadSettingsFromHintAttributes(IEnumerable<Attribute>)
Reads the settings from data type override attribute.
Declaration
protected void ReadSettingsFromHintAttributes(IEnumerable<Attribute> attributes)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Attribute> | attributes | The attributes. |
ReadSettingsFromRequiredAttribute(RequiredAttribute)
Reads the settings from required attribute.
Declaration
protected virtual void ReadSettingsFromRequiredAttribute(RequiredAttribute requiredAttribute)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.DataAnnotations.RequiredAttribute | requiredAttribute | The required attribute. |
ReadSettingsFromScaffoldColumnAttribute(ScaffoldColumnAttribute)
Reads the settings from scaffold column attribute.
Declaration
protected virtual void ReadSettingsFromScaffoldColumnAttribute(ScaffoldColumnAttribute scaffoldColumnAttribute)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.DataAnnotations.ScaffoldColumnAttribute | scaffoldColumnAttribute | The scaffold column attribute. |
ReadSettingsFromUIHintAttributes(IEnumerable<UIHintAttribute>)
Reads the settings from UI hint attribute.
Declaration
protected virtual void ReadSettingsFromUIHintAttributes(IEnumerable<UIHintAttribute> attributes)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.ComponentModel.DataAnnotations.UIHintAttribute> | attributes | The attributes. |