Closed AlexBar closed 12 years ago
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 (see examples https://gist.github.com/3322501):
MvcExtensionsMetadataRegistrar.Register()
For example, Windsor:
MvcExtensionsMetadataRegistrar .RegisterEachConfigurationWithContainer( data => container.Register( Component .For(data.InterfaceType).ImplementedBy(data.MetadataConfigurationType) .LifestyleTransient())) .ConstructMetadataUsing(container.ResolveAll<IModelMetadataConfiguration>) .Register();
Autofac:
var builder = new ContainerBuilder(); MvcExtensionsMetadataRegistrar .RegisterEachConfigurationWithContainer(r => builder.RegisterType(r.MetadataConfigurationType).As(r.InterfaceType)); DependencyResolver.SetResolver(new AutofacDependencyResolver(builder.Build())); MvcExtensionsMetadataRegistrar.Register();
See more https://gist.github.com/3322501
Thanks, commited with squash to master 8abddc726be110a4174c971bccc2de0fdb38cff8
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 (see examples https://gist.github.com/3322501):
MvcExtensionsMetadataRegistrar.Register()
simple way to register your configurations (metadata configuration classes must have default contrucotor)For example, Windsor:
Autofac:
See more https://gist.github.com/3322501