This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Description
A couple of potential ModelMetadata additions came up in offline conversations about #5676:
- have
ModelMetadata implement IModelMetadataProvider. This should significantly reduce the shenanigans we have around ensuring both ModelMetadata and its provider are available. E.g. - many contexts contain both
ModelMetadata and IModelMetadataProvider properties. ModelBinderFactory gets the provider from DI though ModelBinderFactoryContext contains a ModelMetadata property. ExpressionMetadataProvider methods contain both ViewDataDictionary (which has ModelMetadata) and IModelMetadataProvider parameters.
- add a
ContainerMetadata property. This seem slightly redundant if ModelMetadata implements IModelMetadataProvider but would be convenient. - Note information about the containing property is not static and cannot be maintained in
ModelMetadata.