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