1 override of PropertyFilter
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\DefaultModelBindingContext.cs (1)
137
public override Func<ModelMetadata, bool>?
PropertyFilter
1 write to PropertyFilter
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\ModelBindingHelper.cs (1)
249
modelBindingContext.
PropertyFilter
= propertyFilter;
34 references to PropertyFilter
Microsoft.AspNetCore.Mvc.Core (2)
ModelBinding\Binders\ComplexObjectModelBinder.cs (1)
414
if (bindingContext.
PropertyFilter
?.Invoke(propertyMetadata) == false)
ModelBinding\Binders\ComplexTypeModelBinder.cs (1)
238
if (bindingContext.
PropertyFilter
?.Invoke(propertyMetadata) == false)
Microsoft.AspNetCore.Mvc.Core.Test (32)
ControllerBaseTest.cs (32)
2621
Assert.True(context.
PropertyFilter
(context.ModelMetadata.Properties["Property1"]));
2622
Assert.True(context.
PropertyFilter
(context.ModelMetadata.Properties["Property2"]));
2649
Assert.True(context.
PropertyFilter
(context.ModelMetadata.Properties["Property1"]));
2650
Assert.True(context.
PropertyFilter
(context.ModelMetadata.Properties["Property2"]));
2676
Assert.True(context.
PropertyFilter
(context.ModelMetadata.Properties["Property1"]));
2677
Assert.True(context.
PropertyFilter
(context.ModelMetadata.Properties["Property2"]));
2730
Assert.True(context.
PropertyFilter
(context.ModelMetadata.Properties["Include1"]));
2731
Assert.True(context.
PropertyFilter
(context.ModelMetadata.Properties["Include2"]));
2733
Assert.False(context.
PropertyFilter
(context.ModelMetadata.Properties["Exclude1"]));
2734
Assert.False(context.
PropertyFilter
(context.ModelMetadata.Properties["Exclude2"]));
2763
Assert.True(context.
PropertyFilter
(context.ModelMetadata.Properties["Include1"]));
2764
Assert.True(context.
PropertyFilter
(context.ModelMetadata.Properties["Include2"]));
2766
Assert.False(context.
PropertyFilter
(context.ModelMetadata.Properties["Exclude1"]));
2767
Assert.False(context.
PropertyFilter
(context.ModelMetadata.Properties["Exclude2"]));
2797
Assert.True(context.
PropertyFilter
(context.ModelMetadata.Properties["Property1"]));
2798
Assert.True(context.
PropertyFilter
(context.ModelMetadata.Properties["Property2"]));
2800
Assert.False(context.
PropertyFilter
(context.ModelMetadata.Properties["Exclude1"]));
2801
Assert.False(context.
PropertyFilter
(context.ModelMetadata.Properties["Exclude2"]));
2829
Assert.True(context.
PropertyFilter
(context.ModelMetadata.Properties["Property1"]));
2830
Assert.True(context.
PropertyFilter
(context.ModelMetadata.Properties["Property2"]));
2832
Assert.False(context.
PropertyFilter
(context.ModelMetadata.Properties["Exclude1"]));
2833
Assert.False(context.
PropertyFilter
(context.ModelMetadata.Properties["Exclude2"]));
2861
Assert.NotNull(context.
PropertyFilter
);
2867
return context.
PropertyFilter
!(modelMetadata!);
2913
Assert.True(context.
PropertyFilter
(context.ModelMetadata.Properties["Include1"]));
2914
Assert.True(context.
PropertyFilter
(context.ModelMetadata.Properties["Include2"]));
2916
Assert.False(context.
PropertyFilter
(context.ModelMetadata.Properties["Exclude1"]));
2917
Assert.False(context.
PropertyFilter
(context.ModelMetadata.Properties["Exclude2"]));
2945
Assert.True(context.
PropertyFilter
(context.ModelMetadata.Properties["Property1"]));
2946
Assert.True(context.
PropertyFilter
(context.ModelMetadata.Properties["Property2"]));
2973
Assert.True(context.
PropertyFilter
(context.ModelMetadata.Properties["Property1"]));
2974
Assert.True(context.
PropertyFilter
(context.ModelMetadata.Properties["Property2"]));