Implemented interface member:
property
StatusCode
Microsoft.AspNetCore.Mvc.Infrastructure.IStatusCodeActionResult.StatusCode
45 writes to StatusCode
BasicWebSite (1)
Filters\UnprocessableResultFilter.cs (1)
22StatusCode = 422,
Microsoft.AspNetCore.Mvc.Core (25)
AcceptedAtActionResult.cs (1)
39StatusCode = DefaultStatusCode;
AcceptedAtRouteResult.cs (1)
47StatusCode = DefaultStatusCode;
AcceptedResult.cs (3)
24StatusCode = DefaultStatusCode; 37StatusCode = DefaultStatusCode; 60StatusCode = DefaultStatusCode;
ActionResultOfT.cs (1)
98StatusCode = statusCode
BadRequestObjectResult.cs (2)
25StatusCode = DefaultStatusCode; 37StatusCode = DefaultStatusCode;
ConflictObjectResult.cs (2)
25StatusCode = DefaultStatusCode; 37StatusCode = DefaultStatusCode;
ControllerBase.cs (3)
233StatusCode = statusCode 1900StatusCode = problemDetails.Status 2029StatusCode = validationProblem?.Status
CreatedAtActionResult.cs (1)
39StatusCode = DefaultStatusCode;
CreatedAtRouteResult.cs (1)
47StatusCode = DefaultStatusCode;
CreatedResult.cs (3)
25StatusCode = DefaultStatusCode; 42StatusCode = DefaultStatusCode; 66StatusCode = DefaultStatusCode;
DependencyInjection\ApiBehaviorOptionsSetup.cs (1)
43StatusCode = problemDetails.Status,
Infrastructure\ProblemDetailsClientErrorFactory.cs (1)
21StatusCode = problemDetails.Status,
NotFoundObjectResult.cs (1)
24StatusCode = DefaultStatusCode;
ObjectResult.cs (1)
77StatusCode = details.Status;
OkObjectResult.cs (1)
25StatusCode = DefaultStatusCode;
UnauthorizedObjectResult.cs (1)
22StatusCode = DefaultStatusCode;
UnprocessableEntityObjectResult.cs (1)
34StatusCode = DefaultStatusCode;
Microsoft.AspNetCore.Mvc.Core.Test (2)
ObjectResultTests.cs (2)
40StatusCode = 404, 72StatusCode = StatusCodes.Status422UnprocessableEntity,
Microsoft.AspNetCore.Mvc.RazorPages (2)
PageBase.cs (1)
1156=> new ObjectResult(value) { StatusCode = statusCode };
PageModel.cs (1)
1511StatusCode = statusCode
Mvc.Api.Analyzers.Test (14)
TestFiles\ActualApiResponseMetadataFactoryTest\InspectReturnExpressionTests.cs (3)
22return new ObjectResult(new object()) { StatusCode = 201 }; 39StatusCode = StatusCodes.Status422UnprocessableEntity, 57return new BadRequestObjectResult(new object()) { StatusCode = statusCode };
TestFiles\ActualApiResponseMetadataFactoryTest\InspectReturnExpressionTestsForSwitchExpression.cs (3)
30_ => new ObjectResult(new object()) { StatusCode = 201 } 56StatusCode = StatusCodes.Status422UnprocessableEntity, 85_ => new BadRequestObjectResult(new object()) { StatusCode = statusCode }
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsStatusCodesFromObjectInitializer.Input.cs (4)
20StatusCode = 422 28StatusCode = StatusCodes.Status202Accepted 38StatusCode = localStatusCode 47StatusCode = FieldStatusCode
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsStatusCodesFromObjectInitializer.Output.cs (4)
26StatusCode = 422 34StatusCode = StatusCodes.Status202Accepted 44StatusCode = localStatusCode 53StatusCode = FieldStatusCode
XmlFormattersWebSite (1)
Controllers\HomeController.cs (1)
19StatusCode = 400
73 references to StatusCode
Microsoft.AspNetCore.Mvc.Core (5)
ObjectResult.cs (5)
75if (details.Status != null && StatusCode == null) 79else if (details.Status == null && StatusCode != null) 81details.Status = StatusCode; 85if (StatusCode.HasValue) 87context.HttpContext.Response.StatusCode = StatusCode.Value;
Microsoft.AspNetCore.Mvc.Core.Test (55)
AcceptedAtActionResultTests.cs (1)
102Assert.Equal(StatusCodes.Status202Accepted, result.StatusCode);
AcceptedAtRouteResultTests.cs (1)
43Assert.Equal(StatusCodes.Status202Accepted, result.StatusCode);
AcceptedResultTests.cs (1)
39Assert.Equal(StatusCodes.Status202Accepted, result.StatusCode);
ActionResultOfTTest.cs (3)
74Assert.Equal(StatusCodes.Status200OK, objectResult.StatusCode); 92Assert.Equal(StatusCodes.Status400BadRequest, objectResult.StatusCode); 110Assert.Equal(StatusCodes.Status200OK, objectResult.StatusCode);
BadRequestObjectResultTests.cs (2)
19Assert.Equal(StatusCodes.Status400BadRequest, badRequestObjectResult.StatusCode); 30Assert.Equal(StatusCodes.Status400BadRequest, badRequestObjectResult.StatusCode);
ConflictObjectResultTest.cs (2)
19Assert.Equal(StatusCodes.Status409Conflict, conflictObjectResult.StatusCode); 30Assert.Equal(StatusCodes.Status409Conflict, conflictObjectResult.StatusCode);
ControllerBaseTest.cs (35)
1300Assert.Equal(StatusCodes.Status201Created, result.StatusCode); 1315Assert.Equal(StatusCodes.Status201Created, result.StatusCode); 1331Assert.Equal(StatusCodes.Status201Created, result.StatusCode); 1346Assert.Equal(StatusCodes.Status201Created, result.StatusCode); 1362Assert.Equal(StatusCodes.Status201Created, result.StatusCode); 1377Assert.Equal(StatusCodes.Status201Created, result.StatusCode); 1396Assert.Equal(StatusCodes.Status201Created, result.StatusCode); 1420Assert.Equal(StatusCodes.Status201Created, result.StatusCode); 1457Assert.Equal(StatusCodes.Status201Created, result.StatusCode); 1478Assert.Equal(StatusCodes.Status201Created, result.StatusCode); 1494Assert.Equal(StatusCodes.Status202Accepted, result.StatusCode); 1509Assert.Equal(StatusCodes.Status202Accepted, result.StatusCode); 1525Assert.Equal(StatusCodes.Status202Accepted, result.StatusCode); 1541Assert.Equal(StatusCodes.Status202Accepted, result.StatusCode); 1557Assert.Equal(StatusCodes.Status202Accepted, result.StatusCode); 1572Assert.Equal(StatusCodes.Status202Accepted, result.StatusCode); 1590Assert.Equal(StatusCodes.Status202Accepted, result.StatusCode); 1614Assert.Equal(StatusCodes.Status202Accepted, result.StatusCode); 1636Assert.Equal(StatusCodes.Status202Accepted, result.StatusCode); 1657Assert.Equal(StatusCodes.Status202Accepted, result.StatusCode); 2001Assert.Equal(StatusCodes.Status404NotFound, result.StatusCode); 2045Assert.Equal(StatusCodes.Status400BadRequest, result.StatusCode); 2060Assert.Equal(StatusCodes.Status400BadRequest, result.StatusCode); 2091Assert.Equal(StatusCodes.Status422UnprocessableEntity, result.StatusCode); 2106Assert.Equal(StatusCodes.Status422UnprocessableEntity, result.StatusCode); 2138Assert.Equal(StatusCodes.Status409Conflict, result.StatusCode); 2153Assert.Equal(StatusCodes.Status409Conflict, result.StatusCode); 2298Assert.Equal(statusCode, result.StatusCode); 2315Assert.Equal(statusCode, result.StatusCode); 2357Assert.Equal(400, badRequestResult.StatusCode); 2407Assert.Equal(405, objectResult.StatusCode); 2428Assert.Equal(400, badRequestResult.StatusCode); 2476Assert.Equal(500, actionResult.StatusCode); 2502Assert.Equal(500, actionResult.StatusCode); 2547Assert.Equal(422, actionResult.StatusCode);
CreatedResultTests.cs (1)
25Assert.Equal(StatusCodes.Status201Created, result.StatusCode);
DependencyInjection\ApiBehaviorOptionsSetupTest.cs (1)
87Assert.Equal(422, objectResult.StatusCode);
HttpNotFoundObjectResultTest.cs (2)
22Assert.Equal(StatusCodes.Status404NotFound, notFound.StatusCode); 32Assert.Equal(StatusCodes.Status404NotFound, notFound.StatusCode);
HttpOkObjectResultTest.cs (1)
42Assert.Equal(StatusCodes.Status200OK, result.StatusCode);
ObjectResultTests.cs (3)
30Assert.Null(result.StatusCode); 121Assert.Equal(StatusCodes.Status413RequestEntityTooLarge, result.StatusCode.Value); 152Assert.Equal(StatusCodes.Status400BadRequest, result.StatusCode.Value);
UnprocessableEntityObjectResultTests.cs (2)
19Assert.Equal(StatusCodes.Status422UnprocessableEntity, result.StatusCode); 30Assert.Equal(StatusCodes.Status422UnprocessableEntity, result.StatusCode);
Microsoft.AspNetCore.Mvc.RazorPages.Test (8)
PageModelTest.cs (4)
1531Assert.Equal(StatusCodes.Status400BadRequest, result.StatusCode); 1560Assert.Equal(StatusCodes.Status404NotFound, result.StatusCode); 1683Assert.Equal(statusCode, result.StatusCode); 1700Assert.Equal(statusCode, result.StatusCode);
PageTest.cs (4)
1521Assert.Equal(StatusCodes.Status400BadRequest, result.StatusCode); 1550Assert.Equal(StatusCodes.Status404NotFound, result.StatusCode); 1673Assert.Equal(statusCode, result.StatusCode); 1690Assert.Equal(statusCode, result.StatusCode);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (5)
ControllerUnitTestabilityTests.cs (5)
99Assert.Equal(StatusCodes.Status201Created, createdResult.StatusCode); 119Assert.Equal(StatusCodes.Status202Accepted, acceptedResult.StatusCode); 267Assert.Equal(StatusCodes.Status404NotFound, httpNotFoundObjectResult.StatusCode); 301Assert.Equal(StatusCodes.Status400BadRequest, httpBadRequest.StatusCode); 314Assert.Equal(StatusCodes.Status400BadRequest, httpBadRequest.StatusCode);