81 references to Success
BasicWebSite (2)
Controllers\BindPropertiesController.cs (1)
31bindingContext.Result = ModelBindingResult.Success("CustomBoundValue");
Controllers\ContactApiController.cs (1)
148bindingContext.Result = ModelBindingResult.Success("From TestModelBinder: " + val);
FormatterWebSite (1)
PolymorphicBinder.cs (1)
18bindingContext.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)
139bindingContext.Result = ModelBindingResult.Success(model: null); 167bindingContext.Result = ModelBindingResult.Success(model);
ModelBinding\Binders\ByteArrayModelBinder.cs (1)
58bindingContext.Result = ModelBindingResult.Success(model);
ModelBinding\Binders\CancellationTokenModelBinder.cs (1)
26bindingContext.Result = ModelBindingResult.Success(model);
ModelBinding\Binders\CollectionModelBinder.cs (2)
130bindingContext.Result = model == null ? ModelBindingResult.Failed() : ModelBindingResult.Success(model); 186bindingContext.Result = ModelBindingResult.Success(model);
ModelBinding\Binders\ComplexObjectModelBinder.cs (1)
155bindingContext.Result = ModelBindingResult.Success(bindingContext.Model);
ModelBinding\Binders\ComplexTypeModelBinder.cs (1)
220bindingContext.Result = ModelBindingResult.Success(bindingContext.Model);
ModelBinding\Binders\DateTimeModelBinder.cs (1)
86bindingContext.Result = ModelBindingResult.Success(model);
ModelBinding\Binders\DecimalModelBinder.cs (1)
89bindingContext.Result = ModelBindingResult.Success(model);
ModelBinding\Binders\DictionaryModelBinder.cs (1)
213bindingContext.Result = ModelBindingResult.Success(model);
ModelBinding\Binders\DoubleModelBinder.cs (1)
89bindingContext.Result = ModelBindingResult.Success(model);
ModelBinding\Binders\EnumTypeModelBinder.cs (1)
47bindingContext.Result = ModelBindingResult.Success(model);
ModelBinding\Binders\FloatModelBinder.cs (1)
89bindingContext.Result = ModelBindingResult.Success(model);
ModelBinding\Binders\FormCollectionModelBinder.cs (1)
52bindingContext.Result = ModelBindingResult.Success(model);
ModelBinding\Binders\FormFileModelBinder.cs (1)
131bindingContext.Result = ModelBindingResult.Success(value);
ModelBinding\Binders\HeaderModelBinder.cs (1)
159bindingContext.Result = ModelBindingResult.Success(model);
ModelBinding\Binders\KeyedServicesModelBinder.cs (1)
40bindingContext.Result = ModelBindingResult.Success(model);
ModelBinding\Binders\KeyValuePairModelBinder.cs (2)
57bindingContext.Result = ModelBindingResult.Success(model); 85bindingContext.Result = ModelBindingResult.Success(model);
ModelBinding\Binders\ServicesModelBinder.cs (1)
34bindingContext.Result = ModelBindingResult.Success(model);
ModelBinding\Binders\SimpleTypeModelBinder.cs (1)
129bindingContext.Result = ModelBindingResult.Success(model);
ModelBinding\Binders\TryParseModelBinder.cs (1)
80bindingContext.Result = ModelBindingResult.Success(null);
Microsoft.AspNetCore.Mvc.Core.Test (45)
Controllers\ControllerBinderDelegateProviderTest.cs (9)
245context.Result = ModelBindingResult.Success(value); 710var binder = new StubModelBinder(ModelBindingResult.Success(model: null)); 751var binder = new StubModelBinder(ModelBindingResult.Success(model: null)); 813var binder = new StubModelBinder(ModelBindingResult.Success(model: null)); 876var binder = new StubModelBinder(ModelBindingResult.Success(model: null)); 1029bindingContext.Result = ModelBindingResult.Success(model); 1156result = ModelBindingResult.Success(10); 1160result = ModelBindingResult.Success(new TransferInfo 1308mbc.Result = ModelBindingResult.Success(model);
ModelBinding\Binders\BinderTypeModelBinderTest.cs (1)
114bindingContext.Result = ModelBindingResult.Success(_model);
ModelBinding\Binders\CollectionModelBinderTest.cs (1)
462mbc.Result = ModelBindingResult.Success(42);
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (10)
443elementSelector: item => (IModelBinder)new TestModelBinderProvider(item, ModelBindingResult.Success("Test"))); 708var propertyBinder = new TestModelBinderProvider(property, ModelBindingResult.Success(model: null)); 813var propertyBinder = new TestModelBinderProvider(property, ModelBindingResult.Success(model: 57)); 845options.ModelBinderProviders.Insert(0, new TestModelBinderProvider(firstNameProperty, ModelBindingResult.Success("John"))); 848options.ModelBinderProviders.Insert(0, new TestModelBinderProvider(lastNameProperty, ModelBindingResult.Success("Doe"))); 982var result = ModelBindingResult.Success(new Simple { Name = "Hanna" }); 1006var result = ModelBindingResult.Success(new List<string>() { "hi" }); 1026var result = ModelBindingResult.Success(new DateTime(2001, 1, 1)); 1050var result = ModelBindingResult.Success(new DateTime(1800, 1, 1)); 1071var result = ModelBindingResult.Success(model: null);
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (10)
857binder.Results[property] = ModelBindingResult.Success(model: null); 950binder.Results[property] = ModelBindingResult.Success(model: 57); 982binder.Results[firstNameProperty] = ModelBindingResult.Success("John"); 985binder.Results[lastNameProperty] = ModelBindingResult.Success("Doe"); 1014binder.Results[nestedProperty] = ModelBindingResult.Success(null); 1144var result = ModelBindingResult.Success(new Simple { Name = "Hanna" }); 1168var result = ModelBindingResult.Success(new List<string>() { "hi" }); 1188var result = ModelBindingResult.Success(new DateTime(2001, 1, 1)); 1212var result = ModelBindingResult.Success(new DateTime(1800, 1, 1)); 1233var result = ModelBindingResult.Success(model: null);
ModelBinding\Binders\KeyValuePairModelBinderTest.cs (3)
116innerResult = ModelBindingResult.Success(model); 235return ModelBindingResult.Success(model); 249return ModelBindingResult.Success(model);
ModelBinding\ModelBindingResultTest.cs (1)
15var result = ModelBindingResult.Success(model);
ModelBinding\ParameterBinderTest.cs (10)
104var modelBindingResult = ModelBindingResult.Success(null); 204var modelBindingResult = ModelBindingResult.Success(null); 242var modelBindingResult = ModelBindingResult.Success(123); 283var modelBindingResult = ModelBindingResult.Success(123); 319var modelBindingResult = ModelBindingResult.Success(model); 374var modelBindingResult = ModelBindingResult.Success(model); 429var modelBindingResult = ModelBindingResult.Success(model); 483var modelBindingResult = ModelBindingResult.Success(model); 555var modelBindingResult = ModelBindingResult.Success(new JsonPatchDocument()); 684var modelBindingResult = ModelBindingResult.Success(null);
Microsoft.AspNetCore.Mvc.IntegrationTests (6)
BinderTypeBasedModelBinderIntegrationTest.cs (4)
336bindingContext.Result = ModelBindingResult.Success(address); 361bindingContext.Result = ModelBindingResult.Success(address); 379bindingContext.Result = ModelBindingResult.Success(model); 391bindingContext.Result = ModelBindingResult.Success(model: null);
GenericModelBinderIntegrationTest.cs (1)
181bindingContext.Result = ModelBindingResult.Success(new Address());
SuccessfulModelBinder.cs (1)
16bindingContext.Result = ModelBindingResult.Success(model);
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
Infrastructure\PageBinderFactoryTest.cs (1)
834return new ValueTask<ModelBindingResult>(ModelBindingResult.Success(result));
RazorPagesWebSite (1)
PolymorphicModelBinder.cs (1)
26bindingContext.Result = ModelBindingResult.Success(model);