1 instantiation of ComplexObjectModelBinder
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\Binders\ComplexObjectModelBinderProvider.cs (1)
35return new ComplexObjectModelBinder(propertyBinders, parameterBinders, logger);
102 references to ComplexObjectModelBinder
Microsoft.AspNetCore.Mvc.Abstractions.Test (7)
ModelBinding\BindingInfoTest.cs (7)
102new ModelBinderAttribute { BinderType = typeof(ComplexObjectModelBinder), Name = "Test" }, 119Assert.Same(typeof(ComplexObjectModelBinder), bindingInfo.BinderType); 149new ModelBinderAttribute(typeof(ComplexObjectModelBinder)), 168Assert.Same(typeof(ComplexObjectModelBinder), bindingInfo.BinderType); 182metadata.BinderType = typeof(ComplexObjectModelBinder); 191Assert.Same(typeof(ComplexObjectModelBinder), bindingInfo.BinderType); 226new ModelBinderAttribute(typeof(ComplexObjectModelBinder)),
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\Binders\ComplexObjectModelBinderProvider.cs (1)
25var logger = loggerFactory.CreateLogger(typeof(ComplexObjectModelBinder));
Microsoft.AspNetCore.Mvc.Core.Test (89)
ApplicationModels\DefaultApplicationModelProviderTest.cs (2)
1286[ModelBinder(typeof(ComplexObjectModelBinder))] 1323Assert.Same(typeof(ComplexObjectModelBinder), bindingInfo.BinderType);
ApplicationModels\InferParameterBindingInfoConventionTest.cs (1)
1192public IActionResult Action([ModelBinder(typeof(ComplexObjectModelBinder))] Car car) => null;
ModelBinding\Binders\ComplexObjectModelBinderProviderTest.cs (2)
52Assert.IsType<ComplexObjectModelBinder>(result); 79Assert.IsType<ComplexObjectModelBinder>(result);
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (83)
21private readonly ILogger<ComplexObjectModelBinder> _logger = NullLogger<ComplexObjectModelBinder>.Instance; 24[InlineData(true, ComplexObjectModelBinder.ValueProviderDataAvailable)] 25[InlineData(false, ComplexObjectModelBinder.NoDataAvailable)] 31var binder = CreateBinder(bindingContext.ModelMetadata); 48var binder = CreateBinder(bindingContext.ModelMetadata); 54Assert.Equal(ComplexObjectModelBinder.NoDataAvailable, canCreate); 63var binder = CreateBinder(bindingContext.ModelMetadata); 69Assert.Equal(ComplexObjectModelBinder.ValueProviderDataAvailable, canCreate); 73[InlineData(ComplexObjectModelBinder.ValueProviderDataAvailable)] 74[InlineData(ComplexObjectModelBinder.GreedyPropertiesMayHaveData)] 78bindingContext.IsTopLevelObject = expectedCanCreate == ComplexObjectModelBinder.ValueProviderDataAvailable; 80var binder = CreateBinder(bindingContext.ModelMetadata); 90[InlineData(ComplexObjectModelBinder.ValueProviderDataAvailable)] 91[InlineData(ComplexObjectModelBinder.NoDataAvailable)] 98.Returns(valueAvailable == ComplexObjectModelBinder.ValueProviderDataAvailable); 107var binder = CreateBinder(bindingContext.ModelMetadata); 124var binder = CreateBinder(bindingContext.ModelMetadata); 130Assert.Equal(ComplexObjectModelBinder.NoDataAvailable, canCreate); 140var binder = CreateBinder(bindingContext.ModelMetadata); 146Assert.Equal(ComplexObjectModelBinder.ValueProviderDataAvailable, canCreate); 150[InlineData(typeof(TypeWithNoBinderMetadata), ComplexObjectModelBinder.NoDataAvailable)] 151[InlineData(typeof(TypeWithNoBinderMetadata), ComplexObjectModelBinder.ValueProviderDataAvailable)] 159.Returns(valueProviderProvidesValue == ComplexObjectModelBinder.ValueProviderDataAvailable); 166var binder = CreateBinder(bindingContext.ModelMetadata); 176[InlineData(typeof(TypeWithAtLeastOnePropertyMarkedUsingValueBinderMetadata), ComplexObjectModelBinder.GreedyPropertiesMayHaveData)] 177[InlineData(typeof(TypeWithAtLeastOnePropertyMarkedUsingValueBinderMetadata), ComplexObjectModelBinder.ValueProviderDataAvailable)] 178[InlineData(typeof(TypeWithUnmarkedAndBinderMetadataMarkedProperties), ComplexObjectModelBinder.GreedyPropertiesMayHaveData)] 179[InlineData(typeof(TypeWithUnmarkedAndBinderMetadataMarkedProperties), ComplexObjectModelBinder.ValueProviderDataAvailable)] 187.Returns(expectedCanCreate == ComplexObjectModelBinder.ValueProviderDataAvailable); 194var binder = CreateBinder(bindingContext.ModelMetadata); 204[InlineData(typeof(TypeWithAtLeastOnePropertyMarkedUsingValueBinderMetadata), ComplexObjectModelBinder.GreedyPropertiesMayHaveData)] 205[InlineData(typeof(TypeWithAtLeastOnePropertyMarkedUsingValueBinderMetadata), ComplexObjectModelBinder.ValueProviderDataAvailable)] 218.Returns(expectedCanCreate == ComplexObjectModelBinder.ValueProviderDataAvailable); 229var binder = CreateBinder(bindingContext.ModelMetadata); 239[InlineData(typeof(TypeWithUnmarkedAndBinderMetadataMarkedProperties), false, ComplexObjectModelBinder.GreedyPropertiesMayHaveData)] 240[InlineData(typeof(TypeWithUnmarkedAndBinderMetadataMarkedProperties), true, ComplexObjectModelBinder.ValueProviderDataAvailable)] 241[InlineData(typeof(TypeWithNoBinderMetadata), false, ComplexObjectModelBinder.NoDataAvailable)] 242[InlineData(typeof(TypeWithNoBinderMetadata), true, ComplexObjectModelBinder.ValueProviderDataAvailable)] 263var binder = CreateBinder(bindingContext.ModelMetadata); 304var binder = new ComplexObjectModelBinder( 348var binder = new ComplexObjectModelBinder( 392var binder = new ComplexObjectModelBinder( 423var canUpdate = ComplexObjectModelBinder.CanUpdateReadOnlyProperty(metadata.ModelType); 445var binder = new ComplexObjectModelBinder( 476var binder = CreateBinder(bindingContext.ModelMetadata); 479var result = ComplexObjectModelBinder.CanBindItem(bindingContext, metadata); 503var binder = CreateBinder(bindingContext.ModelMetadata); 506var result = ComplexObjectModelBinder.CanBindItem(bindingContext, metadata); 528var binder = CreateBinder(bindingContext.ModelMetadata); 531var result = ComplexObjectModelBinder.CanBindItem(bindingContext, metadata); 555var binder = CreateBinder(bindingContext.ModelMetadata); 558var result = ComplexObjectModelBinder.CanBindItem(bindingContext, metadata); 581var binder = CreateBinder(bindingContext.ModelMetadata); 584var result = ComplexObjectModelBinder.CanBindItem(bindingContext, metadata); 606var binder = CreateBinder(bindingContext.ModelMetadata, options => 671var binder = CreateBinder(bindingContext.ModelMetadata, options => 710var binder = CreateBinder(bindingContext.ModelMetadata, options => 742var binder = CreateBinder(bindingContext.ModelMetadata, options => 765var binder = CreateBinder(bindingContext.ModelMetadata, options => 790var binder = CreateBinder(bindingContext.ModelMetadata, options => 815var binder = CreateBinder(bindingContext.ModelMetadata, options => 842var binder = CreateBinder(bindingContext.ModelMetadata, options => 872var binder = CreateBinder(bindingContext.ModelMetadata); 875ComplexObjectModelBinder.SetProperty(bindingContext, "foo", propertyMetadata, result); 896var binder = CreateBinder(bindingContext.ModelMetadata); 899ComplexObjectModelBinder.SetProperty(bindingContext, "foo", propertyMetadata, result); 920var binder = CreateBinder(bindingContext.ModelMetadata); 923ComplexObjectModelBinder.SetProperty(bindingContext, "foo", propertyMetadata, result); 942var binder = CreateBinder(bindingContext.ModelMetadata); 945ComplexObjectModelBinder.SetProperty(bindingContext, "foo", propertyMetadata, result); 984var binder = CreateBinder(bindingContext.ModelMetadata); 987ComplexObjectModelBinder.SetProperty(bindingContext, propertyName, propertyMetadata, result); 1008var binder = CreateBinder(bindingContext.ModelMetadata); 1011ComplexObjectModelBinder.SetProperty(bindingContext, propertyMetadata.PropertyName, propertyMetadata, result); 1027var binder = CreateBinder(bindingContext.ModelMetadata); 1030ComplexObjectModelBinder.SetProperty(bindingContext, "foo", propertyMetadata, result); 1051var binder = CreateBinder(bindingContext.ModelMetadata); 1054ComplexObjectModelBinder.SetProperty(bindingContext, "foo", propertyMetadata, result); 1072var binder = CreateBinder(bindingContext.ModelMetadata); 1075ComplexObjectModelBinder.SetProperty(bindingContext, "foo.NameNoAttribute", propertyMetadata, result); 1084private static ComplexObjectModelBinder CreateBinder(ModelMetadata metadata, Action<MvcOptions> configureOptions = null) 1093return (ComplexObjectModelBinder)factory.CreateBinder(new ModelBinderFactoryContext()
ModelBinding\Binders\DictionaryModelBinderTest.cs (1)
352NullLogger<ComplexObjectModelBinder>.Instance),
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (4)
ModelMetadataProviderTest.cs (4)
628new TestBinderTypeProvider() { BinderType = typeof(ComplexObjectModelBinder) } 637Assert.Same(typeof(ComplexObjectModelBinder), metadata.BinderType); 646new TestBinderTypeProvider() { BinderType = typeof(ComplexObjectModelBinder) }, 656Assert.Same(typeof(ComplexObjectModelBinder), metadata.BinderType);
Microsoft.AspNetCore.Mvc.IntegrationTests (1)
ComplexObjectIntegrationTest.cs (1)
10protected override Type ExpectedModelBinderType => typeof(ComplexObjectModelBinder);