63 references to Failed
Microsoft.AspNetCore.Mvc.Core (9)
ModelBinding\Binders\CollectionModelBinder.cs (2)
130
bindingContext.Result = model == null ? ModelBindingResult.
Failed
() : ModelBindingResult.Success(model);
153
bindingContext.Result = ModelBindingResult.
Failed
();
ModelBinding\Binders\ComplexObjectModelBinder.cs (2)
151
bindingContext.Result = ModelBindingResult.
Failed
();
168
bindingContext.Result = ModelBindingResult.
Failed
();
ModelBinding\Binders\ComplexTypeModelBinder.cs (1)
216
bindingContext.Result = ModelBindingResult.
Failed
();
ModelBinding\Binders\DictionaryModelBinder.cs (1)
173
bindingContext.Result = ModelBindingResult.
Failed
();
ModelBinding\Binders\HeaderModelBinder.cs (1)
150
bindingContext.Result = ModelBindingResult.
Failed
();
ModelBinding\Binders\KeyedServicesModelBinder.cs (1)
27
bindingContext.Result = ModelBindingResult.
Failed
();
ModelBinding\ParameterBinder.cs (1)
104
return ModelBindingResult.
Failed
();
Microsoft.AspNetCore.Mvc.Core.Test (45)
Controllers\ControllerBinderDelegateProviderTest.cs (2)
1033
bindingContext.Result = ModelBindingResult.
Failed
();
1168
result = ModelBindingResult.
Failed
();
ModelBinding\Binders\CollectionModelBinderTest.cs (7)
242
new StubModelBinder(result: ModelBindingResult.
Failed
()),
277
new StubModelBinder(result: ModelBindingResult.
Failed
()),
317
new StubModelBinder(result: ModelBindingResult.
Failed
()),
354
new StubModelBinder(result: ModelBindingResult.
Failed
()),
396
new StubModelBinder(result: ModelBindingResult.
Failed
()),
504
return ModelBindingResult.
Failed
();
520
return ModelBindingResult.
Failed
();
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (9)
605
var propertyBinder = new TestModelBinderProvider(property, ModelBindingResult.
Failed
());
669
var propertyBinder = new TestModelBinderProvider(property, ModelBindingResult.
Failed
());
740
var propertyBinder = new TestModelBinderProvider(property, ModelBindingResult.
Failed
());
763
var propertyBinder = new TestModelBinderProvider(property, ModelBindingResult.
Failed
());
788
var propertyBinder = new TestModelBinderProvider(property, ModelBindingResult.
Failed
());
871
var result = ModelBindingResult.
Failed
();
894
var result = ModelBindingResult.
Failed
();
918
var result = ModelBindingResult.
Failed
();
941
var result = ModelBindingResult.
Failed
();
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (10)
787
binder.Results[property] = ModelBindingResult.
Failed
();
821
binder.Results[property] = ModelBindingResult.
Failed
();
886
binder.Results[property] = ModelBindingResult.
Failed
();
906
binder.Results[property] = ModelBindingResult.
Failed
();
928
binder.Results[property] = ModelBindingResult.
Failed
();
978
binder.Results[property] = ModelBindingResult.
Failed
();
1033
var result = ModelBindingResult.
Failed
();
1056
var result = ModelBindingResult.
Failed
();
1080
var result = ModelBindingResult.
Failed
();
1103
var result = ModelBindingResult.
Failed
();
ModelBinding\Binders\DateTimeModelBinderTest.cs (2)
87
Assert.Equal(ModelBindingResult.
Failed
(), bindingContext.Result);
102
Assert.Equal(ModelBindingResult.
Failed
(), bindingContext.Result);
ModelBinding\Binders\FloatingPointTypeModelBinderTestOfT.cs (1)
183
Assert.Equal(ModelBindingResult.
Failed
(), bindingContext.Result);
ModelBinding\Binders\KeyValuePairModelBinderTest.cs (3)
120
innerResult = ModelBindingResult.
Failed
();
237
return ModelBindingResult.
Failed
();
251
return ModelBindingResult.
Failed
();
ModelBinding\Binders\SimpleTypeModelBinderTest.cs (1)
191
Assert.Equal(ModelBindingResult.
Failed
(), bindingContext.Result);
ModelBinding\Binders\TryParseTypeModelBinderTest.cs (1)
140
Assert.Equal(ModelBindingResult.
Failed
(), bindingContext.Result);
ModelBinding\ModelBindingHelperTest.cs (5)
28
var binder = new StubModelBinder(ModelBindingResult.
Failed
());
132
var binder = new StubModelBinder(ModelBindingResult.
Failed
());
213
var binder = new StubModelBinder(ModelBindingResult.
Failed
());
461
var binder = new StubModelBinder(ModelBindingResult.
Failed
());
544
var binder = new StubModelBinder(ModelBindingResult.
Failed
());
ModelBinding\ModelBindingResultTest.cs (1)
26
var result = ModelBindingResult.
Failed
();
ModelBinding\ParameterBinderTest.cs (2)
66
var modelBindingResult = ModelBindingResult.
Failed
();
616
var modelBindingResult = ModelBindingResult.
Failed
();
ModelBinding\StubModelBinder.cs (1)
64
Debug.Assert(bindingContext.Result == ModelBindingResult.
Failed
());
Microsoft.AspNetCore.Mvc.IntegrationTests (8)
BinderTypeBasedModelBinderIntegrationTest.cs (6)
322
Debug.Assert(bindingContext.Result == ModelBindingResult.
Failed
());
347
Debug.Assert(bindingContext.Result == ModelBindingResult.
Failed
());
371
Debug.Assert(bindingContext.Result == ModelBindingResult.
Failed
());
389
Debug.Assert(bindingContext.Result == ModelBindingResult.
Failed
());
401
Debug.Assert(bindingContext.Result == ModelBindingResult.
Failed
());
403
bindingContext.Result = ModelBindingResult.
Failed
();
GenericModelBinderIntegrationTest.cs (1)
170
Debug.Assert(bindingContext.Result == ModelBindingResult.
Failed
());
SimpleTypeModelBinderIntegrationTest.cs (1)
630
Assert.Equal(ModelBindingResult.
Failed
(), modelBindingResult);
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
Infrastructure\PageBinderFactoryTest.cs (1)
837
return new ValueTask<ModelBindingResult>(ModelBindingResult.
Failed
());