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