MvcExtensions/Core — pull request #5 by AlexBar (2012-07-29 13:55:45+00:00)
Title: Moved ModelMetadata registration into separate assembly

Model metadata registration improvement: it was moved into separate assembly without any dependency from Core library.

Now user can use the following syntax to register model metadata:

1. ModelMetadataRegistrar.Current.RegisterMetadataProvidersFor(typeof(MvcApplication).Assembly); // assemblies where model metadata class are located. All types will be registered automatically.

2. ModelMetadataRegistrar.Current.RegisterMetadataProvidersFor(types); // A list of types that are derived from IModelMetadataConfiguration. All types will be registered automatically.

3. ModelMetadataRegistrar.Current.RegisterMetadataProvidersFor(configurations); // "configurations" parameter is a collection of ModelMetadataConfiguration<> classes, they can be retrieved from IoC like ModelMetadataRegistrar.Current.RegisterMetadataProvidersFor(DependencyResolver.GetServices());