11 instantiations of ActionResult
Microsoft.AspNetCore.Mvc.Core (2)
ActionResultOfT.cs (2)
66return new ActionResult<TValue>(value); 75return new ActionResult<TValue>(result);
Microsoft.AspNetCore.Mvc.Core.Test (9)
ActionResultOfTTest.cs (7)
18var ex = Assert.Throws<ArgumentException>(() => new ActionResult<FileStreamResult>(value: input)); 29var ex = Assert.Throws<ArgumentException>(() => new ActionResult<FileStreamResult>(result: actionResult)); 40var ex = Assert.Throws<ArgumentException>(() => new ActionResult<TestResult>(value: result)); 49var actionResultOfT = new ActionResult<string>(expected); 64var actionResultOfT = new ActionResult<BaseItem>(value); 82var actionResultOfT = new ActionResult<ProblemDetails>(value); 100var actionResultOfT = new ActionResult<BaseItem>(value);
Infrastructure\ActionMethodExecutorTest.cs (2)
468public ActionResult<TestModel> ReturnsActionResultOfT() => new ActionResult<TestModel>(new TestModel()); 502public Task<ActionResult<TestModel>> ReturnActionResultOFTAsync() => Task.FromResult(new ActionResult<TestModel>(new TestModel()));
101 references to ActionResult
ApiExplorerWebSite (2)
Controllers\ApiExplorerResponseTypeWithApiConventionController.cs (1)
17public Task<ActionResult<Product>> GetTaskOfActionResultOfProduct(int id) => null;
Controllers\ApiExplorerResponseTypeWithoutAttributeController.cs (1)
41public ActionResult<Product> GetActionResultProduct() => null;
BasicWebSite (29)
Controllers\ActionResultOfTController.cs (2)
12public ActionResult<Product> GetProduct(int? productId) 23public async Task<ActionResult<IEnumerable<Product>>> GetProductsAsync()
Controllers\ContactApiController.cs (14)
22public ActionResult<Contact> Get(int id) 34public ActionResult<Contact> Post([FromBody] Contact contact) 42public ActionResult<Contact> PostWithVnd([FromBody] Contact contact) 49public ActionResult<Contact> ActionWithInferredFromBodyParameter(Contact contact) => contact; 52public ActionResult<Contact> ActionWithInferredFromBodyParameterAndCancellationToken(Contact contact, CancellationToken cts) 56public ActionResult<Contact> ActionWithInferredRouteAndQueryParameter(int id, string name, string email) 67public ActionResult<Contact> ActionWithInferredEmptyPrefix([FromQuery] Contact contact) 73public ActionResult<string> ActionWithInferredModelBinderType( 80public ActionResult<string> ActionWithInferredModelBinderTypeWithExplicitModelName( 87public ActionResult<Contact> ActionWithInferredFromServicesParameter(int id, ContactsRepository repository) 91public ActionResult<ContactRequest> ActionWithCompositeComplexTypeParameter(ContactRequest request, ContactsRepository repository) 95public ActionResult<int> ActionReturningStatusCodeResult() 101public ActionResult<int> ActionReturningProblemDetails() 118public ActionResult<int> ActionReturningValidationProblemDetails()
Controllers\CustomServiceApiController.cs (6)
13public ActionResult<string> GetOk([FromKeyedServices("ok_service")] ICustomService service) 19public ActionResult<string> GetNotOk([FromKeyedServices("not_ok_service")] ICustomService service) 25public ActionResult<string> GetBoth( 33public ActionResult<string> GetKeyNull([FromKeyedServices(null)] ICustomService service) 41public ActionResult<string> GetOptionalNotRegistered([FromKeyedServices("no_existing_key")] ICustomService? service) 51public ActionResult<string> GetRequiredNotRegistered([FromKeyedServices("no_existing_key")] ICustomService service)
Controllers\NonNullableApiController.cs (1)
15public ActionResult<string> Get(string language = "pt-br")
Controllers\RequestFormLimitsController.cs (4)
14public ActionResult<Product> RequestFormLimitsBeforeAntiforgeryValidation(Product product) 26public ActionResult<Product> OverrideControllerLevelLimits(Product product) 37public ActionResult<Product> OverrideControllerLevelLimitsUsingDefaultLimits(Product product) 50public ActionResult<Product> RequestSizeLimitBeforeRequestFormLimits(Product product)
Controllers\RequestSizeLimitController.cs (2)
14public ActionResult<Product> RequestSizeLimitCheckBeforeAntiforgeryValidation(Product product) 26public ActionResult<Product> DisableRequestSizeLimit([FromBody] Product product)
FormatterWebSite (15)
Controllers\JsonFormatterController.cs (3)
83public ActionResult<SimpleModel> RoundtripSimpleModel([FromBody] SimpleModel model) 89public ActionResult<SimpleRecordModel> RoundtripRecordType([FromBody] SimpleRecordModel model) => model; 114public ActionResult<SimpleModelWithValidation> RoundtripModelWithValidation([FromBody] SimpleModelWithValidation model)
Controllers\JsonInputFormatterController.cs (1)
13public ActionResult<int> IntValue(int value)
Controllers\JsonOutputFormatterController.cs (10)
14public ActionResult<int> IntResult() => 2; 17public ActionResult<string> StringResult() => "Hello world"; 20public ActionResult<string> StringWithUnicodeResult() => "Hello Mr. 🦊"; 23public ActionResult<string> StringWithNonAsciiContent() => "Une bête de cirque"; 26public ActionResult<SimpleModel> SimpleModelResult() => 30public ActionResult<IEnumerable<SimpleModel>> CollectionModelResult() => 38public ActionResult<Dictionary<string, string>> DictionaryResult() => 47public ActionResult<SimpleModel> LargeObjectResult() => 55public ActionResult<SimpleModel> PolymorphicResult() => new DerivedModel 63public ActionResult<ProblemDetails> ProblemDetailsResult() => NotFound();
Controllers\SystemTextJsonOutputFormatterController.cs (1)
15public ActionResult<SimpleModel> PolymorphicResult() => new DerivedModel
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
Logging\ApiRoutingController.cs (1)
21public ActionResult<string> GetUser(
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (11)
ApiResponseTypeProviderTest.cs (7)
72public Task<ActionResult<BaseModel>> Get(int id) => null; 192public Task<ActionResult<BaseModel>> DeleteBase(int id) => null; 225public Task<ActionResult<BaseModel>> PostModel(int id, BaseModel model) => null; 281public Task<ActionResult<BaseModel>> Put(int id, BaseModel model) => null; 807public ActionResult<DerivedModel> GetUser(int id) => null; 809public ActionResult<DerivedModel> GetUserLocation(int a, int b) => null; 811public ActionResult<DerivedModel> PutModel(string userId, DerivedModel model) => null;
DefaultApiDescriptionProviderTest.cs (4)
2426private ActionResult<Product> ReturnsActionResultOfProduct() => null; 2429private ActionResult<IEnumerable<Product>> ReturnsActionResultOfSequenceOfProducts() => null; 2431private Task<ActionResult<Product>> ReturnsTaskOfActionResultOfProduct() => null; 2434private Task<ActionResult<IEnumerable<Product>>> ReturnsTaskOfActionResultOfSequenceOfProducts() => null;
Microsoft.AspNetCore.Mvc.Core (9)
ActionResultOfT.cs (6)
19/// Initializes a new instance of <see cref="ActionResult{TValue}"/> using the specified <paramref name="value"/>. 35/// Initializes a new instance of <see cref="ActionResult{TValue}"/> using the specified <see cref="ActionResult"/>. 61/// Implicitly converts the specified <paramref name="value"/> to an <see cref="ActionResult{TValue}"/>. 64public static implicit operator ActionResult<TValue>(TValue value) 70/// Implicitly converts the specified <paramref name="result"/> to an <see cref="ActionResult{TValue}"/>. 73public static implicit operator ActionResult<TValue>(ActionResult result)
Infrastructure\ActionResultTypeMapper.cs (1)
17returnType.GetGenericTypeDefinition() == typeof(ActionResult<>))
Infrastructure\IActionResultTypeMapper.cs (2)
14/// <see cref="ActionResult{TValue}"/> to an <see cref="IActionResult"/> during request 15/// processing as well as the mapping of <see cref="ActionResult{TValue}"/> to <c>TValue</c>
Microsoft.AspNetCore.Mvc.Core.Test (7)
ActionResultOfTTest.cs (4)
49var actionResultOfT = new ActionResult<string>(expected); 64var actionResultOfT = new ActionResult<BaseItem>(value); 82var actionResultOfT = new ActionResult<ProblemDetails>(value); 100var actionResultOfT = new ActionResult<BaseItem>(value);
Infrastructure\ActionMethodExecutorTest.cs (2)
468public ActionResult<TestModel> ReturnsActionResultOfT() => new ActionResult<TestModel>(new TestModel()); 502public Task<ActionResult<TestModel>> ReturnActionResultOFTAsync() => Task.FromResult(new ActionResult<TestModel>(new TestModel()));
Infrastructure\ActionResultTypeMapperTest.cs (1)
81var returnType = typeof(ActionResult<string>);
Mvc.Api.Analyzers.Test (21)
TestFiles\ActualApiResponseMetadataFactoryTest\InspectReturnExpressionTests.cs (1)
76public ActionResult<TestModel> InspectReturnExpression_SetsReturnType_WhenValueIsReturned()
TestFiles\ActualApiResponseMetadataFactoryTest\InspectReturnExpressionTestsForSwitchExpression.cs (1)
115public ActionResult<TestModel> InspectReturnExpression_SetsReturnType_WhenValueIsReturned()
TestFiles\ActualApiResponseMetadataFactoryTest\TryGetActualResponseMetadataTests.cs (3)
11public async Task<ActionResult<IEnumerable<TryGetActualResponseMetadataModel>>> ActionWithActionResultOfTReturningOkResult() 19public async Task<ActionResult<IEnumerable<TryGetActualResponseMetadataModel>>> ActionWithActionResultOfTReturningModel() 27public async Task<ActionResult<TryGetActualResponseMetadataModel>> ActionReturningNotFoundAndModel(int id)
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsSuccessStatusCode.Input.cs (1)
14public ActionResult<object> GetItem(string id)
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsSuccessStatusCode.Output.cs (1)
19public ActionResult<object> GetItem(string id)
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixWithConventionAddsMissingStatusCodes.Input.cs (1)
14public ActionResult<string> GetItem(int id)
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixWithConventionAddsMissingStatusCodes.Output.cs (1)
18public ActionResult<string> GetItem(int id)
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixWithConventionMethodAddsMissingStatusCodes.Input.cs (1)
8public ActionResult<string> GetItem(int id)
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixWithConventionMethodAddsMissingStatusCodes.Output.cs (1)
12public ActionResult<string> GetItem(int id)
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixWorksWhenMultipleIdenticalStatusCodesAreInError.Input.cs (1)
16public ActionResult<CodeFixWorksWhenMultipleIdenticalStatusCodesAreInErrorModel> GetItem(int id)
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixWorksWhenMultipleIdenticalStatusCodesAreInError.Output.cs (1)
20public ActionResult<CodeFixWorksWhenMultipleIdenticalStatusCodesAreInErrorModel> GetItem(int id)
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_ForActionResultOfTReturningMethodWithoutAnyAttributes.cs (1)
14public ActionResult<string> Method(Guid? id)
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_IfMethodWithAttribute_ReturnsDerivedType.cs (1)
12public ActionResult<DiagnosticsAreReturned_IfMethodWithAttribute_ReturnsDerivedTypeBaseModel> Method(int id)
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_IfMethodWithAttributeAsynchronouslyReturnsValue_WithoutDocumentation.cs (1)
12public async Task<ActionResult<DiagnosticsAreReturned_IfMethodWithAttributeAsynchronouslyReturnsValue_WithoutDocumentationModel>> Method(int id)
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_IfMethodWithAttributeReturnsValue_WithoutDocumentation.cs (1)
10public ActionResult<DiagnosticsAreReturned_IfMethodWithAttributeReturnsValue_WithoutDocumentationModel> Method(int id)
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_IfMethodWithProducesResponseTypeAttribute_DoesNotDocumentSuccessStatusCode.cs (1)
13public ActionResult<string> /*MM*/Method(int id)
TestFiles\ApiConventionAnalyzerIntegrationTest\NoDiagnosticsAreReturned_ForOkResultReturningAction.cs (1)
12public async Task<ActionResult<IEnumerable<NoDiagnosticsAreReturned_ForOkResultReturningAction>>> Action()
TestFiles\SymbolApiResponseMetadataProviderTest\GetResponseMetadataTests.cs (2)
13public ActionResult<Person> GetPerson(int id) => null; 15public ActionResult<Person> PostPerson(Person person) => null;
Mvc.RoutingWebSite (2)
Controllers\ItemsController.cs (2)
11public ActionResult<Dictionary<object, object>> Index() 22public ActionResult<Dictionary<object, object>> IndexWithArgument(string arg)
XmlFormattersWebSite (4)
Controllers\XmlApiControllerBase.cs (4)
14public ActionResult<Person> ActionReturningClientErrorStatusCodeResult() 18public ActionResult<Person> ActionReturningProblemDetails() 33public ActionResult<Person> ActionReturningValidationProblem([FromQuery] Address address) 37public ActionResult<Person> ActionReturningValidationDetailsWithMetadata()