C# Class FluentMetadata.MVC.FluentMetadataProvider

A custom metadata provider for FluentMetadata.
Inheritance: System.Web.Mvc.ModelMetadataProvider
Show file Open project: forger/FluentMetadata

Public Methods

Method Description
GetMetadataForProperties ( object container, Type containerType ) : IEnumerable

Gets a T:System.Web.Mvc.ModelMetadata object for each property of a model.

GetMetadataForProperty ( Func modelAccessor, Type containerType, string propertyName ) : ModelMetadata

Gets metadata for the specified property.

GetMetadataForType ( Func modelAccessor, Type modelType ) : ModelMetadata

Gets metadata for the specified model accessor and model type.

Private Methods

Method Description
GetProperyAccessor ( object container, Metadata metadata ) : Func

Method Details

GetMetadataForProperties() public method

Gets a T:System.Web.Mvc.ModelMetadata object for each property of a model.
public GetMetadataForProperties ( object container, Type containerType ) : IEnumerable
container object The container.
containerType System.Type The type of the container.
return IEnumerable

GetMetadataForProperty() public method

Gets metadata for the specified property.
public GetMetadataForProperty ( Func modelAccessor, Type containerType, string propertyName ) : ModelMetadata
modelAccessor Func The model accessor.
containerType System.Type The type of the container.
propertyName string The property to get the metadata model for.
return ModelMetadata

GetMetadataForType() public method

Gets metadata for the specified model accessor and model type.
public GetMetadataForType ( Func modelAccessor, Type modelType ) : ModelMetadata
modelAccessor Func The model accessor.
modelType System.Type The type of the model.
return ModelMetadata