public MetadataProviderSetup()
        {
            var options   = _provider.GetRequiredService <IOptions <MvcOptions> >();
            var providers = options.Value.ModelMetadataDetailsProviders;

            _bindingProvider    = providers.OfType <IBindingMetadataProvider>().FirstOrDefault();
            _displayProvider    = providers.OfType <IDisplayMetadataProvider>().FirstOrDefault();
            _validationProvider = providers.OfType <IValidationMetadataProvider>().FirstOrDefault();
        }
Exemplo n.º 2
0
 public AuthenticatedUserIdAwareMetaDataProvider(IBindingMetadataProvider bindingMetadataProvider)
 {
     _decoratedMetadataProvider = bindingMetadataProvider;
 }