2 implementations of IModelMetadataProvider
Microsoft.AspNetCore.Mvc.Abstractions (2)
ModelBinding\ModelMetadata.cs (1)
23public abstract class ModelMetadata : IEquatable<ModelMetadata?>, IModelMetadataProvider
ModelBinding\ModelMetadataProvider.cs (1)
11public abstract class ModelMetadataProvider : IModelMetadataProvider
314 references to IModelMetadataProvider
Microsoft.AspNetCore.Mvc (2)
HotReloadService.cs (2)
24IModelMetadataProvider modelMetadataProvider, 31IModelMetadataProvider modelMetadataProvider,
Microsoft.AspNetCore.Mvc.Abstractions (11)
ModelBinding\IModelMetadataProvider.cs (1)
10/// While not obsolete, implementing or using <see cref="ModelMetadataProvider" /> is preferred over <see cref="IModelMetadataProvider"/>.
ModelBinding\ModelBinderProviderContext.cs (2)
42/// Gets the <see cref="IModelMetadataProvider"/>. 44public abstract IModelMetadataProvider MetadataProvider { get; }
ModelBinding\Validation\ClientModelValidationContext.cs (2)
16/// <param name="metadataProvider">The <see cref="IModelMetadataProvider"/> to be used in validation.</param> 21IModelMetadataProvider metadataProvider,
ModelBinding\Validation\ModelValidationContext.cs (2)
16/// <param name="metadataProvider">The <see cref="IModelMetadataProvider"/> to be used in validation.</param> 22IModelMetadataProvider metadataProvider,
ModelBinding\Validation\ModelValidationContextBase.cs (4)
16/// <param name="metadataProvider">The <see cref="IModelMetadataProvider"/> to be used by this context.</param> 20IModelMetadataProvider metadataProvider) 42/// Gets the <see cref="IModelMetadataProvider"/>. 44public IModelMetadataProvider MetadataProvider { get; }
Microsoft.AspNetCore.Mvc.ApiExplorer (10)
ApiParameterContext.cs (2)
13IModelMetadataProvider metadataProvider, 26public IModelMetadataProvider MetadataProvider { get; }
ApiResponseTypeProvider.cs (5)
16private readonly IModelMetadataProvider _modelMetadataProvider; 21IModelMetadataProvider modelMetadataProvider, 142IModelMetadataProvider? modelMetadataProvider = null) 228IModelMetadataProvider? modelMetadataProvider = null) 280internal static void CalculateResponseFormatForType(ApiResponseType apiResponse, MediaTypeCollection declaredContentTypes, IEnumerable<IApiResponseTypeMetadataProvider>? responseTypeMetadataProviders, IModelMetadataProvider? modelMetadataProvider)
DefaultApiDescriptionProvider.cs (3)
32private readonly IModelMetadataProvider _modelMetadataProvider; 40/// <param name="modelMetadataProvider">The <see cref="IModelMetadataProvider"/>.</param> 47IModelMetadataProvider modelMetadataProvider,
Microsoft.AspNetCore.Mvc.Core (50)
ApplicationModels\ApiBehaviorApplicationModelProvider.cs (1)
18IModelMetadataProvider modelMetadataProvider,
ApplicationModels\DefaultApplicationModelProvider.cs (2)
23private readonly IModelMetadataProvider _modelMetadataProvider; 29IModelMetadataProvider modelMetadataProvider)
ApplicationModels\InferParameterBindingInfoConvention.cs (3)
28private readonly IModelMetadataProvider _modelMetadataProvider; 36IModelMetadataProvider modelMetadataProvider) 47IModelMetadataProvider modelMetadataProvider,
ControllerBase.cs (4)
28private IModelMetadataProvider? _metadataProvider; 88/// Gets or sets the <see cref="IModelMetadataProvider"/>. 91public IModelMetadataProvider MetadataProvider 97_metadataProvider = HttpContext?.RequestServices?.GetRequiredService<IModelMetadataProvider>();
Controllers\ControllerBinderDelegateProvider.cs (3)
17IModelMetadataProvider modelMetadataProvider, 118IModelMetadataProvider modelMetadataProvider, 164IModelMetadataProvider modelMetadataProvider,
DependencyInjection\MvcCoreServiceCollectionExtensions.cs (3)
208services.TryAddSingleton<IModelMetadataProvider, DefaultModelMetadataProvider>(); 218var metadataProvider = s.GetRequiredService<IModelMetadataProvider>();
Infrastructure\ControllerActionInvokerCache.cs (2)
19private readonly IModelMetadataProvider _modelMetadataProvider; 27IModelMetadataProvider modelMetadataProvider,
ModelBinding\Metadata\DefaultModelMetadata.cs (5)
18private readonly IModelMetadataProvider _provider; 40/// <param name="provider">The <see cref="IModelMetadataProvider"/>.</param> 44IModelMetadataProvider provider, 54/// <param name="provider">The <see cref="IModelMetadataProvider"/>.</param> 59IModelMetadataProvider provider,
ModelBinding\Metadata\DefaultModelMetadataProvider.cs (1)
16/// A default implementation of <see cref="IModelMetadataProvider"/> based on reflection.
ModelBinding\ModelBinderFactory.cs (4)
24private readonly IModelMetadataProvider _metadataProvider; 32/// <param name="metadataProvider">The <see cref="IModelMetadataProvider"/>.</param> 36IModelMetadataProvider metadataProvider, 244public override IModelMetadataProvider MetadataProvider { get; }
ModelBinding\ModelBindingHelper.cs (7)
41IModelMetadataProvider metadataProvider, 81IModelMetadataProvider metadataProvider, 127IModelMetadataProvider metadataProvider, 167IModelMetadataProvider metadataProvider, 208IModelMetadataProvider metadataProvider, 362/// <param name="metadataProvider">The <see cref="IModelMetadataProvider"/>.</param> 367IModelMetadataProvider metadataProvider,
ModelBinding\ModelMetadataProviderExtensions.cs (2)
11/// Extensions methods for <see cref="IModelMetadataProvider"/>. 24this IModelMetadataProvider provider,
ModelBinding\ObjectModelValidator.cs (5)
15private readonly IModelMetadataProvider _modelMetadataProvider; 22/// <param name="modelMetadataProvider">The <see cref="IModelMetadataProvider"/>.</param> 25IModelMetadataProvider modelMetadataProvider, 112/// <param name="metadataProvider">The <see cref="IModelMetadataProvider"/>.</param> 119IModelMetadataProvider metadataProvider,
ModelBinding\ParameterBinder.cs (3)
17private readonly IModelMetadataProvider _modelMetadataProvider; 24/// <param name="modelMetadataProvider">The <see cref="IModelMetadataProvider"/>.</param> 31IModelMetadataProvider modelMetadataProvider,
ModelBinding\Validation\DefaultObjectValidator.cs (3)
20/// <param name="modelMetadataProvider">The <see cref="IModelMetadataProvider"/>.</param> 24IModelMetadataProvider modelMetadataProvider, 36IModelMetadataProvider metadataProvider,
ModelBinding\Validation\ValidationVisitor.cs (2)
34IModelMetadataProvider metadataProvider, 60protected IModelMetadataProvider MetadataProvider { get; }
Microsoft.AspNetCore.Mvc.Core.Test (45)
ApplicationModels\ConsumesConstraintForFormFileParameterConventionTest.cs (1)
58IModelMetadataProvider modelMetadataProvider = null)
ApplicationModels\DefaultApplicationModelProviderTest.cs (4)
117var modelMetadataProvider = TestModelMetadataProvider.CreateDefaultProvider(new[] { detailsProvider }); 260var modelMetadataProvider = TestModelMetadataProvider.CreateDefaultProvider(new[] { detailsProvider }); 288var modelMetadataProvider = TestModelMetadataProvider.CreateDefaultProvider(new[] { detailsProvider }); 1874IModelMetadataProvider modelMetadataProvider)
ApplicationModels\InferParameterBindingInfoConventionTest.cs (3)
900IModelMetadataProvider modelMetadataProvider = null, 910IModelMetadataProvider modelMetadataProvider = null) 924IModelMetadataProvider modelMetadataProvider = null)
Controllers\ControllerBinderDelegateProviderTest.cs (4)
346var mockMetadataProvider = new Mock<IModelMetadataProvider>(); 1326IModelMetadataProvider modelMetadataProvider = null, 1340var metadataProvider = modelMetadataProvider ?? TestModelMetadataProvider.CreateDefaultProvider(); 1352IModelMetadataProvider modelMetadataProvider,
Controllers\DefaultControllerActivatorTest.cs (1)
174.Setup(s => s.GetService(typeof(IModelMetadataProvider)))
Controllers\DefaultControllerFactoryTest.cs (1)
226.Setup(s => s.GetService(typeof(IModelMetadataProvider)))
ModelBinding\Binders\BodyModelBinderTests.cs (1)
677IModelMetadataProvider metadataProvider = null)
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (2)
20private static readonly IModelMetadataProvider _metadataProvider = TestModelMetadataProvider.CreateDefaultProvider(); 419var metadataProvider = _metadataProvider;
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (2)
20private static readonly IModelMetadataProvider _metadataProvider = TestModelMetadataProvider.CreateDefaultProvider(); 499var metadataProvider = _metadataProvider;
ModelBinding\Metadata\DefaultModelMetadataTest.cs (19)
460var provider = new Mock<IModelMetadataProvider>(MockBehavior.Strict); 538var provider = new Mock<IModelMetadataProvider>(MockBehavior.Strict); 643var provider = new Mock<IModelMetadataProvider>(MockBehavior.Strict); 953var metadataProvider = new Mock<IModelMetadataProvider>(); 973var metadataProvider = new Mock<IModelMetadataProvider>(); 994var modelMetadata = CreateModelMetadata(modelIdentity, Mock.Of<IModelMetadataProvider>(), hasValidators: false); 1012var modelMetadata = CreateModelMetadata(modelIdentity, Mock.Of<IModelMetadataProvider>(), hasValidators: false); 1028var modelMetadata = CreateModelMetadata(modelIdentity, Mock.Of<IModelMetadataProvider>(), hasValidators: false); 1042var modelMetadata = CreateModelMetadata(modelIdentity, Mock.Of<IModelMetadataProvider>(), hasValidators: true); 1056var modelMetadata = CreateModelMetadata(modelIdentity, Mock.Of<IModelMetadataProvider>(), hasValidators: null); 1071var metadataProvider = new Mock<IModelMetadataProvider>(); 1096var metadataProvider = new Mock<IModelMetadataProvider>(); 1123var metadataProvider = new Mock<IModelMetadataProvider>(); 1147var metadataProvider = new Mock<IModelMetadataProvider>(); 1174var metadataProvider = new Mock<IModelMetadataProvider>(); 1215var metadataProvider = new Mock<IModelMetadataProvider>(); 1258var metadataProvider = new Mock<IModelMetadataProvider>(); 1287var metadataProvider = new Mock<IModelMetadataProvider>(); 1595IModelMetadataProvider metadataProvider,
ModelBinding\Metadata\ModelMetadataProviderExtensionsTest.cs (2)
14var provider = (IModelMetadataProvider)new EmptyModelMetadataProvider();
ModelBinding\ParameterBinderTest.cs (2)
746var mockModelMetadataProvider = new Mock<IModelMetadataProvider>(MockBehavior.Strict); 789var mockModelMetadataProvider = new Mock<IModelMetadataProvider>(MockBehavior.Strict);
ModelBinding\TestModelBinderProviderContext.cs (1)
63public override IModelMetadataProvider MetadataProvider { get; }
ModelBinding\Validation\DefaultObjectValidatorTests.cs (2)
1469var metadataProvider = TestModelMetadataProvider.CreateDefaultProvider(excludeFilters.ToArray()); 1476var metadataProvider = TestModelMetadataProvider.CreateDefaultProvider(providers);
Microsoft.AspNetCore.Mvc.Core.TestCommon (6)
TestModelBinderFactory.cs (4)
28IModelMetadataProvider metadataProvider, 50IModelMetadataProvider metadataProvider, 67protected TestModelBinderFactory(IModelMetadataProvider metadataProvider, IOptions<MvcOptions> options) 73IModelMetadataProvider metadataProvider,
TestModelMetadataProvider.cs (2)
44public static IModelMetadataProvider CreateDefaultProvider(IList<IMetadataDetailsProvider> providers) 68public static IModelMetadataProvider CreateProvider(IList<IMetadataDetailsProvider> providers)
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (33)
DataAnnotationsClientModelValidatorProviderTest.cs (1)
13private readonly IModelMetadataProvider _metadataProvider = TestModelMetadataProvider.CreateDefaultProvider();
DataAnnotationsModelValidatorProviderTest.cs (1)
14private readonly IModelMetadataProvider _metadataProvider = TestModelMetadataProvider.CreateDefaultProvider();
DataTypeClientModelValidatorProviderTest.cs (1)
11private readonly IModelMetadataProvider _metadataProvider = TestModelMetadataProvider.CreateDefaultProvider();
ModelMetadataProviderTest.cs (30)
23var provider = CreateProvider(); 51var provider = CreateProvider(); 65var provider = CreateProvider(); 78var provider = CreateProvider(); 90var provider = CreateProvider(); 105var provider = CreateProvider(); 120var provider = CreateProvider(); 135var provider = CreateProvider(); 150var provider = CreateProvider(); 163var provider = CreateProvider(); 228var provider = CreateProvider(attributes); 244var provider = CreateProvider(attributes); 347var provider = CreateProvider(attributes); 397var provider = CreateProvider(attributes); 413var provider = CreateProvider(new[] { display }); 429var provider = CreateProvider(new[] { display }); 450var provider = CreateProvider(new[] { display }); 476var provider = CreateProvider(new[] { display }); 497var provider = CreateProvider(new[] { displayFormat }); 514var provider = CreateProvider(new[] { displayFormat }); 532var provider = CreateProvider(new object[] { dataType, displayFormat }); 550var provider = CreateProvider(new object[] { displayFormat, dataType, }); 573var provider = CreateProvider(new object[] { displayFormat, dataType, }); 591var provider = CreateProvider(new object[] { hidden, uiHint, }); 612var provider = CreateProvider(binderProviders); 631var provider = CreateProvider(attributes); 650var provider = CreateProvider(attributes); 667var provider = CreateProvider(attributes); 684var provider = CreateProvider(attributes); 877private IModelMetadataProvider CreateProvider(params object[] attributes)
Microsoft.AspNetCore.Mvc.IntegrationTests (23)
ComplexTypeIntegrationTestBase.cs (1)
3766IModelMetadataProvider metadataProvider = null)
ComplexTypeModelBinderIntegrationTest.cs (1)
18IModelMetadataProvider metadataProvider = null)
ExcludeBindingMetadataProviderIntegrationTest.cs (1)
82var metadataProvider = TestModelMetadataProvider.CreateProvider(options.ModelMetadataDetailsProviders);
ModelBindingTestContext.cs (1)
10public IModelMetadataProvider MetadataProvider { get; set; }
ModelBindingTestHelper.cs (11)
25IModelMetadataProvider metadataProvider = null, 30metadataProvider = metadataProvider ?? services.GetRequiredService<IModelMetadataProvider>(); 57var metadataProvider = TestModelMetadataProvider.CreateProvider(options.ModelMetadataDetailsProviders); 69var metadataProvider = serviceProvider.GetRequiredService<IModelMetadataProvider>(); 84IModelMetadataProvider metadataProvider, 111IModelMetadataProvider metadataProvider, 125IModelMetadataProvider metadataProvider, 147IModelMetadataProvider metadataProvider, 163IModelMetadataProvider metadataProvider, 183serviceCollection.AddSingleton<IModelMetadataProvider>(services =>
ParameterBinderExtensions.cs (3)
23var modelMetadataProvider = context.HttpContext.RequestServices.GetService<IModelMetadataProvider>(); 59IModelMetadataProvider modelMetadataProvider,
TryValidateModelIntegrationTest.cs (2)
202IModelMetadataProvider metadataProvider) 209IModelMetadataProvider metadataProvider,
ValidationIntegrationTests.cs (3)
2578public RecordingObjectValidator(IModelMetadataProvider modelMetadataProvider, IList<IModelValidatorProvider> validatorProviders, MvcOptions mvcOptions) 2585public override ValidationVisitor GetValidationVisitor(ActionContext actionContext, IModelValidatorProvider validatorProvider, ValidatorCache validatorCache, IModelMetadataProvider metadataProvider, ValidationStateDictionary validationState) 2594public RecordingValidationVisitor(ActionContext actionContext, IModelValidatorProvider validatorProvider, ValidatorCache validatorCache, IModelMetadataProvider metadataProvider, ValidationStateDictionary validationState)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (3)
JsonPatchOperationsArrayProvider.cs (3)
18private readonly IModelMetadataProvider _modelMetadataProvider; 23/// <param name="modelMetadataProvider">The <see cref="IModelMetadataProvider"/>.</param> 24public JsonPatchOperationsArrayProvider(IModelMetadataProvider modelMetadataProvider)
Microsoft.AspNetCore.Mvc.Razor (5)
RazorPageActivator.cs (2)
21private readonly IModelMetadataProvider _metadataProvider; 30IModelMetadataProvider metadataProvider,
RazorPagePropertyActivator.cs (3)
18private readonly IModelMetadataProvider _metadataProvider; 19private readonly Func<IModelMetadataProvider, ModelStateDictionary, ViewDataDictionary> _rootFactory; 27IModelMetadataProvider metadataProvider,
Microsoft.AspNetCore.Mvc.Razor.Test (2)
RazorPageActivatorTest.cs (1)
39private IModelMetadataProvider MetadataProvider { get; }
RazorPageCreateModelExpressionTest.cs (1)
316serviceCollection.AddSingleton<IModelMetadataProvider>(provider);
Microsoft.AspNetCore.Mvc.RazorPages (25)
ApplicationModels\DefaultPageApplicationModelPartsProvider.cs (2)
15private readonly IModelMetadataProvider _modelMetadataProvider; 20public DefaultPageApplicationModelPartsProvider(IModelMetadataProvider modelMetadataProvider)
ApplicationModels\DefaultPageApplicationModelProvider.cs (2)
21private readonly IModelMetadataProvider _modelMetadataProvider; 27IModelMetadataProvider modelMetadataProvider,
Infrastructure\DefaultPageFactoryProvider.cs (2)
18private readonly IModelMetadataProvider _modelMetadataProvider; 23IModelMetadataProvider metadataProvider,
Infrastructure\PageActionInvokerCache.cs (2)
21private readonly IModelMetadataProvider _modelMetadataProvider; 29IModelMetadataProvider modelMetadataProvider,
Infrastructure\PageActionInvokerCacheEntry.cs (2)
16Func<IModelMetadataProvider, ModelStateDictionary, ViewDataDictionary> viewDataFactory, 66public Func<IModelMetadataProvider, ModelStateDictionary, ViewDataDictionary> ViewDataFactory { get; }
Infrastructure\PageActionInvokerProvider.cs (2)
21private readonly IModelMetadataProvider _modelMetadataProvider; 33IModelMetadataProvider modelMetadataProvider,
Infrastructure\PageBinderFactory.cs (2)
15IModelMetadataProvider modelMetadataProvider, 84IModelMetadataProvider modelMetadataProvider,
Infrastructure\PageRequestDelegateFactory.cs (3)
22private readonly IModelMetadataProvider _modelMetadataProvider; 34IModelMetadataProvider modelMetadataProvider, 48IModelMetadataProvider modelMetadataProvider,
PageBase.cs (4)
28private IModelMetadataProvider? _metadataProvider; 65/// Gets or sets the <see cref="IModelMetadataProvider"/>. 68public IModelMetadataProvider MetadataProvider 72_metadataProvider ??= HttpContext?.RequestServices?.GetRequiredService<IModelMetadataProvider>();
PageModel.cs (4)
28private IModelMetadataProvider? _metadataProvider; 135/// Gets or sets the <see cref="IModelMetadataProvider"/>. 137public IModelMetadataProvider MetadataProvider 141_metadataProvider ??= HttpContext?.RequestServices?.GetRequiredService<IModelMetadataProvider>();
Microsoft.AspNetCore.Mvc.RazorPages.Test (2)
Infrastructure\DefaultPageFactoryProviderTest.cs (2)
367IModelMetadataProvider provider = null, 376provider ?? Mock.Of<IModelMetadataProvider>(),
Microsoft.AspNetCore.Mvc.TagHelpers (2)
InputTagHelper.cs (1)
187nameof(IModelMetadataProvider),
SelectTagHelper.cs (1)
91nameof(IModelMetadataProvider),
Microsoft.AspNetCore.Mvc.TagHelpers.Test (7)
InputTagHelperTest.cs (2)
2374IModelMetadataProvider metadataProvider = null) 2393IModelMetadataProvider metadataProvider = null)
TestableHtmlGenerator.cs (5)
25public TestableHtmlGenerator(IModelMetadataProvider metadataProvider) 30public TestableHtmlGenerator(IModelMetadataProvider metadataProvider, IUrlHelper urlHelper) 40IModelMetadataProvider metadataProvider, 63IModelMetadataProvider metadataProvider) 71IModelMetadataProvider metadataProvider,
Microsoft.AspNetCore.Mvc.ViewFeatures (63)
DefaultDisplayTemplates.cs (2)
93var metadataProvider = serviceProvider.GetRequiredService<IModelMetadataProvider>();
DefaultEditorTemplates.cs (2)
75var metadataProvider = serviceProvider.GetRequiredService<IModelMetadataProvider>();
DefaultHtmlGenerator.cs (3)
39private readonly IModelMetadataProvider _metadataProvider; 51/// <param name="metadataProvider">The <see cref="IModelMetadataProvider"/>.</param> 58IModelMetadataProvider metadataProvider,
DefaultValidationHtmlAttributeProvider.cs (3)
16private readonly IModelMetadataProvider _metadataProvider; 24/// <param name="metadataProvider">The <see cref="IModelMetadataProvider"/>.</param> 29IModelMetadataProvider metadataProvider,
ExpressionMetadataProvider.cs (4)
17IModelMetadataProvider metadataProvider) 132/// <param name="metadataProvider">The <see cref="IModelMetadataProvider"/>.</param> 139IModelMetadataProvider metadataProvider) 197IModelMetadataProvider metadataProvider)
HtmlHelper.cs (2)
64IModelMetadataProvider metadataProvider, 122public IModelMetadataProvider MetadataProvider { get; }
HtmlHelperOfT.cs (1)
28IModelMetadataProvider metadataProvider,
ModelExplorer.cs (7)
16private readonly IModelMetadataProvider _metadataProvider; 25/// <param name="metadataProvider">The <see cref="IModelMetadataProvider"/>.</param> 29IModelMetadataProvider metadataProvider, 44/// <param name="metadataProvider">The <see cref="IModelMetadataProvider"/>.</param> 49IModelMetadataProvider metadataProvider, 67/// <param name="metadataProvider">The <see cref="IModelMetadataProvider"/>.</param> 72IModelMetadataProvider metadataProvider,
ModelExpressionProvider.cs (5)
15private readonly IModelMetadataProvider _modelMetadataProvider; 21/// <param name="modelMetadataProvider">The <see cref="IModelMetadataProvider"/>.</param> 22public ModelExpressionProvider(IModelMetadataProvider modelMetadataProvider) 57Resources.FormatCreateModelExpression_NullModelMetadata(nameof(IModelMetadataProvider), name)); 82Resources.FormatCreateModelExpression_NullModelMetadata(nameof(IModelMetadataProvider), expression));
ModelMetadataProviderExtensions.cs (3)
9/// Extensions methods for <see cref="IModelMetadataProvider"/>. 17/// <param name="provider">The <see cref="IModelMetadataProvider"/>.</param> 24this IModelMetadataProvider provider,
PartialViewResultExecutor.cs (2)
34/// <param name="modelMetadataProvider">The <see cref="IModelMetadataProvider"/>.</param> 42IModelMetadataProvider modelMetadataProvider)
Rendering\IHtmlHelper.cs (1)
31IModelMetadataProvider MetadataProvider { get; }
ViewComponentResultExecutor.cs (3)
31private readonly IModelMetadataProvider _modelMetadataProvider; 41/// <param name="modelMetadataProvider">The <see cref="IModelMetadataProvider"/>.</param> 48IModelMetadataProvider modelMetadataProvider,
ViewDataDictionary.cs (10)
25private readonly IModelMetadataProvider _metadataProvider; 31/// <see cref="IModelMetadataProvider"/> instance used to create <see cref="ViewFeatures.ModelExplorer"/> 37IModelMetadataProvider metadataProvider, 68/// <see cref="IModelMetadataProvider"/> instance used to create <see cref="ViewFeatures.ModelExplorer"/> 72internal ViewDataDictionary(IModelMetadataProvider metadataProvider) 81/// <see cref="IModelMetadataProvider"/> instance used to create <see cref="ViewFeatures.ModelExplorer"/> 91IModelMetadataProvider metadataProvider, 101/// <see cref="IModelMetadataProvider"/> instance used to create <see cref="ViewFeatures.ModelExplorer"/> 113IModelMetadataProvider metadataProvider, 243IModelMetadataProvider metadataProvider,
ViewDataDictionaryControllerPropertyActivator.cs (3)
17private readonly IModelMetadataProvider _modelMetadataProvider; 25/// <param name="modelMetadataProvider">The <see cref="IModelMetadataProvider"/> to use.</param> 26public ViewDataDictionaryControllerPropertyActivator(IModelMetadataProvider modelMetadataProvider)
ViewDataDictionaryFactory.cs (4)
12public static Func<IModelMetadataProvider, ModelStateDictionary, ViewDataDictionary> CreateFactory(Type modelType) 17var constructor = type.GetConstructor(new[] { typeof(IModelMetadataProvider), typeof(ModelStateDictionary) }); 20var parameter1 = Expression.Parameter(typeof(IModelMetadataProvider), "metadataProvider"); 24Expression.Lambda<Func<IModelMetadataProvider, ModelStateDictionary, ViewDataDictionary>>(
ViewDataDictionaryOfT.cs (2)
25IModelMetadataProvider metadataProvider, 83internal ViewDataDictionary(IModelMetadataProvider metadataProvider)
ViewExecutor.cs (4)
37/// <param name="modelMetadataProvider">The <see cref="IModelMetadataProvider" />.</param> 44IModelMetadataProvider modelMetadataProvider) 97/// Gets the <see cref="IModelMetadataProvider"/>. 99protected IModelMetadataProvider? ModelMetadataProvider { get; }
ViewResultExecutor.cs (2)
34/// <param name="modelMetadataProvider">The <see cref="IModelMetadataProvider"/>.</param> 42IModelMetadataProvider modelMetadataProvider)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (23)
DefaultEditorTemplatesTest.cs (1)
1374public IModelMetadataProvider MetadataProvider
DefaultHtmlGeneratorTest.cs (2)
1002private static IHtmlGenerator GetGenerator(IModelMetadataProvider metadataProvider, MvcViewOptions options = default) 1031private static ViewContext GetViewContext<TModel>(TModel model, IModelMetadataProvider metadataProvider, HtmlHelperOptions options = default)
DefaultValidationHtmlAttributeProviderTest.cs (2)
251private static ViewContext GetViewContext<TModel>(TModel model, IModelMetadataProvider metadataProvider) 268private static ValidationHtmlAttributeProvider GetAttributeProvider(IModelMetadataProvider metadataProvider)
RemoteAttributeBaseTest.cs (1)
466IModelMetadataProvider metadataProvider = null)
Rendering\DefaultTemplatesUtilities.cs (7)
138public static HtmlHelper<TModel> GetHtmlHelper<TModel>(IModelMetadataProvider provider) 143public static HtmlHelper<ObjectTemplateModel> GetHtmlHelper(IModelMetadataProvider provider) 149IModelMetadataProvider provider) 154public static HtmlHelper<TModel> GetHtmlHelper<TModel>(TModel model, IModelMetadataProvider provider) 190IModelMetadataProvider provider, 200IModelMetadataProvider provider, 222IModelMetadataProvider provider,
Rendering\HtmlHelperNameExtensionsTest.cs (2)
162var provider = new Mock<IModelMetadataProvider>(MockBehavior.Strict); 191var provider = new Mock<IModelMetadataProvider>(MockBehavior.Strict);
Rendering\HtmlHelperSelectTest.cs (1)
1572public TestHtmlHelper(IModelMetadataProvider metadataProvider)
ViewComponentResultTest.cs (1)
673services.AddSingleton<IModelMetadataProvider, EmptyModelMetadataProvider>();
ViewDataDictionaryTest.cs (5)
51var metadataProvider = new Mock<IModelMetadataProvider>(MockBehavior.Strict); 70var metadataProvider = new Mock<IModelMetadataProvider>(MockBehavior.Strict); 90var metadataProvider = new Mock<IModelMetadataProvider>(MockBehavior.Strict); 819public TestViewDataDictionary(IModelMetadataProvider metadataProvider) 824public TestViewDataDictionary(IModelMetadataProvider metadataProvider, Type declaredModelType)
ViewExecutorTest.cs (1)
163serviceCollection.AddSingleton<IModelMetadataProvider>(new EmptyModelMetadataProvider());
Microsoft.AspNetCore.Mvc.Views.TestCommon (2)
HtmlGeneratorUtilities.cs (2)
16public static IHtmlGenerator GetHtmlGenerator(IModelMetadataProvider provider) 27public static IHtmlGenerator GetHtmlGenerator(IModelMetadataProvider provider, IUrlHelperFactory urlHelperFactory, MvcViewOptions options)