81 references to Success
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.Abstractions (2)
ModelBinding\IModelBinder.cs (1)
25
/// a value returned from <see cref="ModelBindingResult.
Success
"/>.
ModelBinding\ModelBindingContext.cs (1)
119
/// <see cref="ModelBindingResult.
Success
"/> if model binding succeeded.
Microsoft.AspNetCore.Mvc.Core (23)
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 (2)
130
bindingContext.Result = model == null ? ModelBindingResult.Failed() : ModelBindingResult.
Success
(model);
186
bindingContext.Result = ModelBindingResult.
Success
(model);
ModelBinding\Binders\ComplexObjectModelBinder.cs (1)
155
bindingContext.Result = ModelBindingResult.
Success
(bindingContext.Model);
ModelBinding\Binders\ComplexTypeModelBinder.cs (1)
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 (1)
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 (1)
159
bindingContext.Result = ModelBindingResult.
Success
(model);
ModelBinding\Binders\KeyedServicesModelBinder.cs (1)
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 (45)
Controllers\ControllerBinderDelegateProviderTest.cs (9)
245
context.Result = ModelBindingResult.
Success
(value);
710
var binder = new StubModelBinder(ModelBindingResult.
Success
(model: null));
751
var binder = new StubModelBinder(ModelBindingResult.
Success
(model: null));
813
var binder = new StubModelBinder(ModelBindingResult.
Success
(model: null));
876
var binder = new StubModelBinder(ModelBindingResult.
Success
(model: null));
1029
bindingContext.Result = ModelBindingResult.
Success
(model);
1156
result = ModelBindingResult.
Success
(10);
1160
result = ModelBindingResult.
Success
(new TransferInfo
1308
mbc.Result = ModelBindingResult.
Success
(model);
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 (10)
443
elementSelector: item => (IModelBinder)new TestModelBinderProvider(item, ModelBindingResult.
Success
("Test")));
708
var propertyBinder = new TestModelBinderProvider(property, ModelBindingResult.
Success
(model: null));
813
var propertyBinder = new TestModelBinderProvider(property, ModelBindingResult.
Success
(model: 57));
845
options.ModelBinderProviders.Insert(0, new TestModelBinderProvider(firstNameProperty, ModelBindingResult.
Success
("John")));
848
options.ModelBinderProviders.Insert(0, new TestModelBinderProvider(lastNameProperty, ModelBindingResult.
Success
("Doe")));
982
var result = ModelBindingResult.
Success
(new Simple { Name = "Hanna" });
1006
var result = ModelBindingResult.
Success
(new List<string>() { "hi" });
1026
var result = ModelBindingResult.
Success
(new DateTime(2001, 1, 1));
1050
var result = ModelBindingResult.
Success
(new DateTime(1800, 1, 1));
1071
var result = ModelBindingResult.
Success
(model: null);
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (10)
857
binder.Results[property] = ModelBindingResult.
Success
(model: null);
950
binder.Results[property] = ModelBindingResult.
Success
(model: 57);
982
binder.Results[firstNameProperty] = ModelBindingResult.
Success
("John");
985
binder.Results[lastNameProperty] = ModelBindingResult.
Success
("Doe");
1014
binder.Results[nestedProperty] = ModelBindingResult.
Success
(null);
1144
var result = ModelBindingResult.
Success
(new Simple { Name = "Hanna" });
1168
var result = ModelBindingResult.
Success
(new List<string>() { "hi" });
1188
var result = ModelBindingResult.
Success
(new DateTime(2001, 1, 1));
1212
var result = ModelBindingResult.
Success
(new DateTime(1800, 1, 1));
1233
var result = ModelBindingResult.
Success
(model: null);
ModelBinding\Binders\KeyValuePairModelBinderTest.cs (3)
116
innerResult = ModelBindingResult.
Success
(model);
235
return ModelBindingResult.
Success
(model);
249
return ModelBindingResult.
Success
(model);
ModelBinding\ModelBindingResultTest.cs (1)
15
var result = ModelBindingResult.
Success
(model);
ModelBinding\ParameterBinderTest.cs (10)
104
var modelBindingResult = ModelBindingResult.
Success
(null);
204
var modelBindingResult = ModelBindingResult.
Success
(null);
242
var modelBindingResult = ModelBindingResult.
Success
(123);
283
var modelBindingResult = ModelBindingResult.
Success
(123);
319
var modelBindingResult = ModelBindingResult.
Success
(model);
374
var modelBindingResult = ModelBindingResult.
Success
(model);
429
var modelBindingResult = ModelBindingResult.
Success
(model);
483
var modelBindingResult = ModelBindingResult.
Success
(model);
555
var modelBindingResult = ModelBindingResult.
Success
(new JsonPatchDocument());
684
var modelBindingResult = ModelBindingResult.
Success
(null);
Microsoft.AspNetCore.Mvc.IntegrationTests (6)
BinderTypeBasedModelBinderIntegrationTest.cs (4)
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);
GenericModelBinderIntegrationTest.cs (1)
181
bindingContext.Result = ModelBindingResult.
Success
(new Address());
SuccessfulModelBinder.cs (1)
16
bindingContext.Result = ModelBindingResult.
Success
(model);
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
Infrastructure\PageBinderFactoryTest.cs (1)
834
return new ValueTask<ModelBindingResult>(ModelBindingResult.
Success
(result));
RazorPagesWebSite (1)
PolymorphicModelBinder.cs (1)
26
bindingContext.Result = ModelBindingResult.
Success
(model);