1 write to BindingMetadata
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\Metadata\BindingMetadataProviderContext.cs (1)
30BindingMetadata = new BindingMetadata();
90 references to BindingMetadata
Microsoft.AspNetCore.Mvc.Core (14)
ModelBinding\Metadata\BindingSourceMetadataProvider.cs (1)
49context.BindingMetadata.BindingSource = BindingSource;
ModelBinding\Metadata\DefaultBindingMetadataProvider.cs (9)
26context.BindingMetadata.BinderModelName = binderModelNameAttribute.Name; 36context.BindingMetadata.BinderType = binderTypeAttribute.BinderType; 46context.BindingMetadata.BindingSource = bindingSourceAttribute.BindingSource; 55context.BindingMetadata.PropertyFilterProvider = null; 59context.BindingMetadata.PropertyFilterProvider = propertyFilterProviders[0]; 64context.BindingMetadata.PropertyFilterProvider = composite; 70context.BindingMetadata.IsBindingAllowed = bindingBehavior.Behavior != BindingBehavior.Never; 71context.BindingMetadata.IsBindingRequired = bindingBehavior.Behavior == BindingBehavior.Required; 76context.BindingMetadata.BoundConstructor = constructorInfo;
ModelBinding\Metadata\DefaultModelMetadata.cs (2)
99context.BindingMetadata.ModelBindingMessageProvider = 103_details.BindingMetadata = context.BindingMetadata;
ModelBinding\Metadata\ExcludeBindingMetadataProvider.cs (1)
41context.BindingMetadata.IsBindingAllowed = false;
ModelBinding\Metadata\IBindingMetadataProvider.cs (1)
14/// Sets the values for properties of <see cref="BindingMetadataProviderContext.BindingMetadata"/>.
Microsoft.AspNetCore.Mvc.Core.Test (57)
ModelBinding\Metadata\BindingSourceMetadataProviderTests.cs (1)
22Assert.Equal(BindingSource.Special, context.BindingMetadata.BindingSource);
ModelBinding\Metadata\DefaultBindingMetadataProviderTest.cs (52)
31Assert.Equal(typeof(HeaderModelBinder), context.BindingMetadata.BinderType); 55Assert.Equal(typeof(HeaderModelBinder), context.BindingMetadata.BinderType); 78Assert.Equal("Product", context.BindingMetadata.BinderModelName); 102Assert.Equal("Product", context.BindingMetadata.BinderModelName); 125Assert.Equal(BindingSource.Body, context.BindingMetadata.BindingSource); 149Assert.Equal(BindingSource.Body, context.BindingMetadata.BindingSource); 171Assert.False(context.BindingMetadata.IsBindingAllowed); 172Assert.False(context.BindingMetadata.IsBindingRequired); 194Assert.False(context.BindingMetadata.IsBindingAllowed); 195Assert.False(context.BindingMetadata.IsBindingRequired); 217Assert.True(context.BindingMetadata.IsBindingAllowed); 218Assert.False(context.BindingMetadata.IsBindingRequired); 240Assert.True(context.BindingMetadata.IsBindingAllowed); 241Assert.True(context.BindingMetadata.IsBindingRequired); 263Assert.True(context.BindingMetadata.IsBindingAllowed); 264Assert.True(context.BindingMetadata.IsBindingRequired); 286Assert.False(context.BindingMetadata.IsBindingAllowed); 287Assert.False(context.BindingMetadata.IsBindingRequired); 309Assert.False(context.BindingMetadata.IsBindingAllowed); 310Assert.False(context.BindingMetadata.IsBindingRequired); 332Assert.True(context.BindingMetadata.IsBindingAllowed); 333Assert.False(context.BindingMetadata.IsBindingRequired); 355Assert.True(context.BindingMetadata.IsBindingAllowed); 356Assert.True(context.BindingMetadata.IsBindingRequired); 378Assert.True(context.BindingMetadata.IsBindingAllowed); 379Assert.True(context.BindingMetadata.IsBindingRequired); 430Assert.True(context.BindingMetadata.IsBindingAllowed); 431Assert.True(context.BindingMetadata.IsBindingRequired); 448Assert.True(context.BindingMetadata.IsBindingAllowed); 449Assert.True(context.BindingMetadata.IsBindingRequired); 466Assert.False(context.BindingMetadata.IsBindingAllowed); 467Assert.False(context.BindingMetadata.IsBindingRequired); 484Assert.False(context.BindingMetadata.IsBindingAllowed); 485Assert.False(context.BindingMetadata.IsBindingRequired); 507Assert.True(context.BindingMetadata.IsBindingAllowed); 508Assert.False(context.BindingMetadata.IsBindingRequired); 530Assert.True(context.BindingMetadata.IsBindingAllowed); 531Assert.True(context.BindingMetadata.IsBindingRequired); 553Assert.True(context.BindingMetadata.IsBindingAllowed); 554Assert.True(context.BindingMetadata.IsBindingRequired); 576Assert.False(context.BindingMetadata.IsBindingAllowed); 577Assert.False(context.BindingMetadata.IsBindingRequired); 595Assert.True(context.BindingMetadata.IsBindingAllowed); 596Assert.True(context.BindingMetadata.IsBindingRequired); 615context.BindingMetadata.IsBindingAllowed = initialValue; 616context.BindingMetadata.IsBindingRequired = initialValue; 624Assert.Equal(initialValue, context.BindingMetadata.IsBindingAllowed); 625Assert.Equal(initialValue, context.BindingMetadata.IsBindingRequired); 646context.BindingMetadata.IsBindingAllowed = initialValue; 647context.BindingMetadata.IsBindingRequired = initialValue; 655Assert.Equal(initialValue, context.BindingMetadata.IsBindingAllowed); 656Assert.Equal(initialValue, context.BindingMetadata.IsBindingRequired);
ModelBinding\Metadata\ExcludeBindingMetadataProviderTest.cs (4)
23context.BindingMetadata.IsBindingAllowed = initialValue; 29Assert.Equal(initialValue, context.BindingMetadata.IsBindingAllowed); 47context.BindingMetadata.IsBindingAllowed = initialValue; 53Assert.False(context.BindingMetadata.IsBindingAllowed);
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
TestModelMetadataProvider.cs (1)
204action(context.BindingMetadata);
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
DataAnnotationsMetadataProvider.cs (1)
49context.BindingMetadata.IsReadOnly = !editableAttribute.AllowEdit;
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (15)
DataAnnotationsMetadataProviderTest.cs (6)
163Assert.True(context.BindingMetadata.IsReadOnly); 182Assert.False(context.BindingMetadata.IsReadOnly); 1486context.BindingMetadata.IsBindingRequired = initialValue; 1492Assert.Equal(initialValue, context.BindingMetadata.IsBindingRequired); 1508context.BindingMetadata.IsReadOnly = initialValue; 1514Assert.Equal(initialValue, context.BindingMetadata.IsReadOnly);
DataMemberRequiredBindingMetadataProviderTest.cs (9)
33Assert.True(context.BindingMetadata.IsBindingRequired); 55context.BindingMetadata.IsBindingRequired = initialValue; 61Assert.Equal(initialValue, context.BindingMetadata.IsBindingRequired); 80context.BindingMetadata.IsBindingRequired = initialValue; 86Assert.Equal(initialValue, context.BindingMetadata.IsBindingRequired); 103context.BindingMetadata.IsBindingRequired = initialValue; 109Assert.Equal(initialValue, context.BindingMetadata.IsBindingRequired); 131context.BindingMetadata.IsBindingRequired = initialValue; 137Assert.Equal(initialValue, context.BindingMetadata.IsBindingRequired);
Microsoft.AspNetCore.Mvc.Formatters.Xml (2)
ModelBinding\DataMemberRequiredBindingMetadataProvider.cs (2)
26if (context.BindingMetadata.IsBindingRequired) 48context.BindingMetadata.IsBindingRequired = true;