1 write to ModelBinderProviders
Microsoft.AspNetCore.Mvc.Core (1)
MvcOptions.cs (1)
46ModelBinderProviders = new List<IModelBinderProvider>();
63 references to ModelBinderProviders
Microsoft.AspNetCore.Mvc.Core (20)
Infrastructure\MvcCoreMvcOptionsSetup.cs (18)
48options.ModelBinderProviders.Add(new BinderTypeModelBinderProvider()); 49options.ModelBinderProviders.Add(new ServicesModelBinderProvider()); 50options.ModelBinderProviders.Add(new BodyModelBinderProvider(options.InputFormatters, _readerFactory, _loggerFactory, options)); 51options.ModelBinderProviders.Add(new HeaderModelBinderProvider()); 52options.ModelBinderProviders.Add(new FloatingPointTypeModelBinderProvider()); 53options.ModelBinderProviders.Add(new EnumTypeModelBinderProvider(options)); 54options.ModelBinderProviders.Add(new DateTimeModelBinderProvider()); 55options.ModelBinderProviders.Add(new SimpleTypeModelBinderProvider()); 56options.ModelBinderProviders.Add(new TryParseModelBinderProvider()); 57options.ModelBinderProviders.Add(new CancellationTokenModelBinderProvider()); 58options.ModelBinderProviders.Add(new ByteArrayModelBinderProvider()); 59options.ModelBinderProviders.Add(new FormFileModelBinderProvider()); 60options.ModelBinderProviders.Add(new FormCollectionModelBinderProvider()); 61options.ModelBinderProviders.Add(new KeyValuePairModelBinderProvider()); 62options.ModelBinderProviders.Add(new DictionaryModelBinderProvider()); 63options.ModelBinderProviders.Add(new ArrayModelBinderProvider()); 64options.ModelBinderProviders.Add(new CollectionModelBinderProvider()); 65options.ModelBinderProviders.Add(new ComplexObjectModelBinderProvider());
ModelBinding\ModelBinderFactory.cs (2)
41_providers = options.Value.ModelBinderProviders.ToArray(); 59nameof(MvcOptions.ModelBinderProviders),
Microsoft.AspNetCore.Mvc.Core.Test (31)
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (10)
608options.ModelBinderProviders.Insert(0, propertyBinder); 673options.ModelBinderProviders.Insert(0, propertyBinder); 712options.ModelBinderProviders.Insert(0, propertyBinder); 744options.ModelBinderProviders.Insert(0, propertyBinder); 767options.ModelBinderProviders.Insert(0, propertyBinder); 792options.ModelBinderProviders.Insert(0, propertyBinder); 817options.ModelBinderProviders.Insert(0, propertyBinder); 845options.ModelBinderProviders.Insert(0, new TestModelBinderProvider(firstNameProperty, ModelBindingResult.Success("John"))); 848options.ModelBinderProviders.Insert(0, new TestModelBinderProvider(lastNameProperty, ModelBindingResult.Success("Doe"))); 1092var factory = TestModelBinderFactory.Create(options.Value.ModelBinderProviders.ToArray());
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (4)
1252var lastIndex = options.Value.ModelBinderProviders.Count - 1; 1253options.Value.ModelBinderProviders.RemoveType<ComplexObjectModelBinderProvider>(); 1254options.Value.ModelBinderProviders.Add(new TestableComplexTypeModelBinderProvider()); 1256var factory = TestModelBinderFactory.Create(options.Value.ModelBinderProviders.ToArray());
ModelBinding\ModelBinderFactoryTest.cs (17)
20var expected = $"'{typeof(MvcOptions).FullName}.{nameof(MvcOptions.ModelBinderProviders)}' must not be " + 44options.Value.ModelBinderProviders.Add(new TestModelBinderProvider(_ => null)); 70options.Value.ModelBinderProviders.Add(new TestModelBinderProvider(c => 110options.Value.ModelBinderProviders.Add(new TestModelBinderProvider(c => 145options.Value.ModelBinderProviders.Add(new TestModelBinderProvider(c => 186options.Value.ModelBinderProviders.Add(new TestModelBinderProvider(c => 224options.Value.ModelBinderProviders.Add(new TestModelBinderProvider(c => 255options.Value.ModelBinderProviders.Add(new TestModelBinderProvider(c => 370options.Value.ModelBinderProviders.Insert(0, modelBinderProvider); 425options.Value.ModelBinderProviders.Add(widgetProvider); 426options.Value.ModelBinderProviders.Add(widgetIdProvider); 487options.Value.ModelBinderProviders.Add(widgetProvider); 488options.Value.ModelBinderProviders.Add(widgetIdProvider); 541options.Value.ModelBinderProviders.Add(widgetProvider); 542options.Value.ModelBinderProviders.Add(widgetIdProvider); 605options.Value.ModelBinderProviders.Add(widgetProvider); 606options.Value.ModelBinderProviders.Add(widgetIdProvider);
Microsoft.AspNetCore.Mvc.Core.TestCommon (2)
TestModelBinderFactory.cs (2)
39options.Value.ModelBinderProviders.Add(provider); 61options.Value.ModelBinderProviders.Add(provider);
Microsoft.AspNetCore.Mvc.IntegrationTests (9)
ActionParametersIntegrationTest.cs (2)
463options.ModelBinderProviders.RemoveType<ComplexObjectModelBinderProvider>(); 465options.ModelBinderProviders.Add(new ComplexTypeModelBinderProvider());
BindingSourceMetadataProviderIntegrationTest.cs (2)
22options.ModelBinderProviders.Insert(0, new CancellationTokenModelBinderProvider()); 76options.ModelBinderProviders.Insert(0, new FormFileModelBinderProvider());
ComplexTypeModelBinderIntegrationTest.cs (2)
24options.ModelBinderProviders.RemoveType<ComplexObjectModelBinderProvider>(); 25options.ModelBinderProviders.Add(new ComplexTypeModelBinderProvider());
ExcludeBindingMetadataProviderIntegrationTest.cs (2)
23options.ModelBinderProviders.Insert(0, modelBinderProvider); 68options.ModelBinderProviders.Insert(0, modelBinderProvider);
ModelBindingTestHelper.cs (1)
94options.Value.ModelBinderProviders.Insert(0, binderProvider);
Microsoft.AspNetCore.Mvc.Test (1)
MvcOptionsSetupTest.cs (1)
47options.ModelBinderProviders,