C# Class Rebel.Framework.Localization.Web.Mvc.LocalizingModelMetadataProvider

Localizes display names. If a name is specified it's considered a key If a display name is not specified for a property the following keys are considered in this order: - Namespace . Class name . Property name - Namespace part after the assembly's default namespace . Class name . Property name (e.g. the property "Name" of the class "Rebel.Framework.Web.Models.CoreEntityModel" becomes Models.CoreEntityModel.Name) - Class name . Property name - Property name (if TestSimplePropertyName is true)
Inheritance: System.Web.Mvc.DataAnnotationsModelMetadataProvider
Exibir arquivo Open project: RebelCMS/rebelcmsxu5 Class Usage Examples

Public Methods

Method Description
GetConventionKeyNames ( Type containerType, string propertyName, bool testSimplePropertyName ) : IEnumerable
LocalizingModelMetadataProvider ( ) : System

Protected Methods

Method Description
CreateMetadata ( IEnumerable attributes, Type containerType, Func modelAccessor, Type modelType, string propertyName ) : ModelMetadata

Method Details

CreateMetadata() protected method

protected CreateMetadata ( IEnumerable attributes, Type containerType, Func modelAccessor, Type modelType, string propertyName ) : ModelMetadata
attributes IEnumerable
containerType System.Type
modelAccessor Func
modelType System.Type
propertyName string
return ModelMetadata

GetConventionKeyNames() public static method

public static GetConventionKeyNames ( Type containerType, string propertyName, bool testSimplePropertyName ) : IEnumerable
containerType System.Type
propertyName string
testSimplePropertyName bool
return IEnumerable

LocalizingModelMetadataProvider() public method

public LocalizingModelMetadataProvider ( ) : System
return System