1 override of Result
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\DefaultModelBindingContext.cs (1)
155
public override ModelBindingResult
Result
53 writes to Result
BasicWebSite (2)
Controllers\BindPropertiesController.cs (1)
31
bindingContext.
Result
= ModelBindingResult.Success("CustomBoundValue");
Controllers\ContactApiController.cs (1)
148
bindingContext.
Result
= ModelBindingResult.Success("From TestModelBinder: " + val);
FormatterWebSite (1)
PolymorphicBinder.cs (1)
18
bindingContext.
Result
= ModelBindingResult.Success(model);
Microsoft.AspNetCore.Mvc.Core (31)
ModelBinding\Binders\BodyModelBinder.cs (2)
139
bindingContext.
Result
= ModelBindingResult.Success(model: null);
167
bindingContext.
Result
= ModelBindingResult.Success(model);
ModelBinding\Binders\ByteArrayModelBinder.cs (1)
58
bindingContext.
Result
= ModelBindingResult.Success(model);
ModelBinding\Binders\CancellationTokenModelBinder.cs (1)
26
bindingContext.
Result
= ModelBindingResult.Success(model);
ModelBinding\Binders\CollectionModelBinder.cs (3)
130
bindingContext.
Result
= model == null ? ModelBindingResult.Failed() : ModelBindingResult.Success(model);
153
bindingContext.
Result
= ModelBindingResult.Failed();
186
bindingContext.
Result
= ModelBindingResult.Success(model);
ModelBinding\Binders\ComplexObjectModelBinder.cs (3)
151
bindingContext.
Result
= ModelBindingResult.Failed();
155
bindingContext.
Result
= ModelBindingResult.Success(bindingContext.Model);
168
bindingContext.
Result
= ModelBindingResult.Failed();
ModelBinding\Binders\ComplexTypeModelBinder.cs (2)
216
bindingContext.
Result
= ModelBindingResult.Failed();
220
bindingContext.
Result
= ModelBindingResult.Success(bindingContext.Model);
ModelBinding\Binders\DateTimeModelBinder.cs (1)
86
bindingContext.
Result
= ModelBindingResult.Success(model);
ModelBinding\Binders\DecimalModelBinder.cs (1)
89
bindingContext.
Result
= ModelBindingResult.Success(model);
ModelBinding\Binders\DictionaryModelBinder.cs (2)
173
bindingContext.
Result
= ModelBindingResult.Failed();
213
bindingContext.
Result
= ModelBindingResult.Success(model);
ModelBinding\Binders\DoubleModelBinder.cs (1)
89
bindingContext.
Result
= ModelBindingResult.Success(model);
ModelBinding\Binders\EnumTypeModelBinder.cs (1)
47
bindingContext.
Result
= ModelBindingResult.Success(model);
ModelBinding\Binders\FloatModelBinder.cs (1)
89
bindingContext.
Result
= ModelBindingResult.Success(model);
ModelBinding\Binders\FormCollectionModelBinder.cs (1)
52
bindingContext.
Result
= ModelBindingResult.Success(model);
ModelBinding\Binders\FormFileModelBinder.cs (1)
131
bindingContext.
Result
= ModelBindingResult.Success(value);
ModelBinding\Binders\HeaderModelBinder.cs (3)
95
bindingContext.
Result
= result;
150
bindingContext.
Result
= ModelBindingResult.Failed();
159
bindingContext.
Result
= ModelBindingResult.Success(model);
ModelBinding\Binders\KeyedServicesModelBinder.cs (2)
27
bindingContext.
Result
= ModelBindingResult.Failed();
40
bindingContext.
Result
= ModelBindingResult.Success(model);
ModelBinding\Binders\KeyValuePairModelBinder.cs (2)
57
bindingContext.
Result
= ModelBindingResult.Success(model);
85
bindingContext.
Result
= ModelBindingResult.Success(model);
ModelBinding\Binders\ServicesModelBinder.cs (1)
34
bindingContext.
Result
= ModelBindingResult.Success(model);
ModelBinding\Binders\SimpleTypeModelBinder.cs (1)
129
bindingContext.
Result
= ModelBindingResult.Success(model);
ModelBinding\Binders\TryParseModelBinder.cs (1)
80
bindingContext.
Result
= ModelBindingResult.Success(null);
Microsoft.AspNetCore.Mvc.Core.Test (11)
Controllers\ControllerBinderDelegateProviderTest.cs (3)
245
context.
Result
= ModelBindingResult.Success(value);
1029
bindingContext.
Result
= ModelBindingResult.Success(model);
1033
bindingContext.
Result
= ModelBindingResult.Failed();
ModelBinding\Binders\BinderTypeModelBinderTest.cs (1)
114
bindingContext.
Result
= ModelBindingResult.Success(_model);
ModelBinding\Binders\CollectionModelBinderTest.cs (1)
462
mbc.
Result
= ModelBindingResult.Success(42);
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (1)
640
bindingContext.
Result
= _result;
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (1)
1635
bindingContext.
Result
= result;
ModelBinding\ParameterBinderTest.cs (1)
734
context.
Result
= modelBinderResult;
ModelBinding\StubModelBinder.cs (3)
21
context.
Result
= result;
40
context.
Result
= result;
50
context.
Result
= result;
Microsoft.AspNetCore.Mvc.IntegrationTests (7)
BinderTypeBasedModelBinderIntegrationTest.cs (5)
336
bindingContext.
Result
= ModelBindingResult.Success(address);
361
bindingContext.
Result
= ModelBindingResult.Success(address);
379
bindingContext.
Result
= ModelBindingResult.Success(model);
391
bindingContext.
Result
= ModelBindingResult.Success(model: null);
403
bindingContext.
Result
= ModelBindingResult.Failed();
GenericModelBinderIntegrationTest.cs (1)
181
bindingContext.
Result
= ModelBindingResult.Success(new Address());
SuccessfulModelBinder.cs (1)
16
bindingContext.
Result
= ModelBindingResult.Success(model);
RazorPagesWebSite (1)
PolymorphicModelBinder.cs (1)
26
bindingContext.
Result
= ModelBindingResult.Success(model);
37 references to Result
Microsoft.AspNetCore.Mvc.Abstractions (4)
ModelBinding\IModelBinder.cs (2)
20
/// If model binding was successful, the <see cref="ModelBindingContext.
Result
"/> should have
24
/// A model binder that completes successfully should set <see cref="ModelBindingContext.
Result
"/> to
ModelBinding\ModelBindingContext.cs (2)
117
/// Before an <see cref="IModelBinder"/> is called, <see cref="
Result
"/> will be set to a value indicating
118
/// failure. The binder should set <see cref="
Result
"/> to a value created with
Microsoft.AspNetCore.Mvc.Core (16)
ModelBinding\Binders\CollectionModelBinder.cs (4)
210
/// For back-compatibility reasons, <see cref="ModelBindingContext.
Result
" /> must have
290
if (bindingContext.
Result
.IsModelSet)
292
var boundValue = bindingContext.
Result
.Model;
358
result = bindingContext.
Result
;
ModelBinding\Binders\ComplexObjectModelBinder.cs (2)
462
result = bindingContext.
Result
;
495
result = bindingContext.
Result
;
ModelBinding\Binders\ComplexTypeModelBinder.cs (2)
282
result = bindingContext.
Result
;
303
/// A <see cref="Task"/> that when completed will set <see cref="ModelBindingContext.
Result
"/> to the
ModelBinding\Binders\DictionaryModelBinder.cs (3)
115
var result = bindingContext.
Result
;
186
var valueResult = bindingContext.
Result
;
204
valueResult = bindingContext.
Result
;
ModelBinding\Binders\HeaderModelBinder.cs (1)
92
result = bindingContext.
Result
;
ModelBinding\Binders\KeyValuePairModelBinder.cs (1)
106
return bindingContext.
Result
;
ModelBinding\Binders\TryParseModelBinder.cs (1)
21
private static readonly MemberExpression BindingResultExpression = Expression.Property(BindingContextExpression, nameof(ModelBindingContext.
Result
));
ModelBinding\ModelBindingHelper.cs (1)
270
var modelBindingResult = modelBindingContext.
Result
;
ModelBinding\ParameterBinder.cs (1)
136
var modelBindingResult = modelBindingContext.
Result
;
Microsoft.AspNetCore.Mvc.Core.Test (11)
ModelBinding\Binders\FormFileModelBinderTest.cs (10)
63
Assert.True(bindingContext.
Result
.IsModelSet);
65
var entry = bindingContext.ValidationState[bindingContext.
Result
.Model];
103
Assert.True(bindingContext.
Result
.IsModelSet);
105
var entry = bindingContext.ValidationState[bindingContext.
Result
.Model];
145
Assert.True(bindingContext.
Result
.IsModelSet);
147
var entry = bindingContext.ValidationState[bindingContext.
Result
.Model];
179
Assert.True(bindingContext.
Result
.IsModelSet);
181
var entry = bindingContext.ValidationState[bindingContext.
Result
.Model];
215
Assert.True(bindingContext.
Result
.IsModelSet);
217
var entry = bindingContext.ValidationState[bindingContext.
Result
.Model];
ModelBinding\StubModelBinder.cs (1)
64
Debug.Assert(bindingContext.
Result
== ModelBindingResult.Failed());
Microsoft.AspNetCore.Mvc.IntegrationTests (6)
BinderTypeBasedModelBinderIntegrationTest.cs (5)
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());
GenericModelBinderIntegrationTest.cs (1)
170
Debug.Assert(bindingContext.
Result
== ModelBindingResult.Failed());