1 override of StatusCode
Microsoft.AspNetCore.Http (1)
452 writes to StatusCode
Aspire.Dashboard (3)
BasicWebSite (1)
Benchmarks (2)
blazor-devserver (1)
CustomAuthorizationFailureResponse (1)
Diagnostics.EFCore.FunctionalTests (2)
ExceptionHandlerSample (1)
FormatterWebSite (1)
GenericHostWebSite (1)
IIS.Microbenchmarks (1)
InMemory.FunctionalTests (16)
InProcessWebSite (8)
LocalizationSample (2)
Microsoft.AspNetCore.Authentication (2)
Microsoft.AspNetCore.Authentication.Cookies (2)
Microsoft.AspNetCore.Authentication.JwtBearer (2)
Microsoft.AspNetCore.Authentication.Negotiate (3)
Microsoft.AspNetCore.Authentication.Negotiate.Test (6)
Microsoft.AspNetCore.Authentication.Test (78)
Microsoft.AspNetCore.Authorization.Test (1)
Microsoft.AspNetCore.Components.Endpoints (7)
Microsoft.AspNetCore.Components.Server (3)
Microsoft.AspNetCore.Components.WebAssembly.Server (3)
Microsoft.AspNetCore.ConcurrencyLimiter (1)
Microsoft.AspNetCore.Cors (2)
Microsoft.AspNetCore.Cors.Test (1)
Microsoft.AspNetCore.Diagnostics (6)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (4)
Microsoft.AspNetCore.Diagnostics.HealthChecks (1)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
Microsoft.AspNetCore.Diagnostics.Tests (23)
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Microsoft.AspNetCore.HostFiltering (1)
Microsoft.AspNetCore.Hosting (1)
Microsoft.AspNetCore.Http (2)
Microsoft.AspNetCore.Http.Abstractions.Tests (2)
Microsoft.AspNetCore.Http.Connections (24)
Microsoft.AspNetCore.Http.Extensions (13)
Microsoft.AspNetCore.Http.Extensions.Tests (13)
ProblemDetailsServiceTest.cs (6)
26Response = { Body = stream, StatusCode = StatusCodes.Status400BadRequest },
52Response = { Body = stream, StatusCode = StatusCodes.Status400BadRequest },
71Response = { Body = stream, StatusCode = StatusCodes.Status400BadRequest },
87Response = { Body = stream, StatusCode = StatusCodes.Status400BadRequest },
102Response = { Body = stream, StatusCode = StatusCodes.Status400BadRequest },
122Response = { Body = stream, StatusCode = StatusCodes.Status400BadRequest },
Microsoft.AspNetCore.Http.Microbenchmarks (1)
Microsoft.AspNetCore.Http.Results (34)
Microsoft.AspNetCore.Http.Tests (2)
Microsoft.AspNetCore.HttpLogging.Tests (28)
Microsoft.AspNetCore.HttpsPolicy (1)
Microsoft.AspNetCore.Identity.InMemory.Test (9)
Microsoft.AspNetCore.Mvc.Core (16)
Microsoft.AspNetCore.Mvc.Core.Test (4)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Microsoft.AspNetCore.OpenApi (1)
Microsoft.AspNetCore.OutputCaching.Tests (5)
Microsoft.AspNetCore.Owin.Tests (1)
Microsoft.AspNetCore.RateLimiting (1)
Microsoft.AspNetCore.RateLimiting.Tests (14)
Microsoft.AspNetCore.ResponseCaching (3)
Microsoft.AspNetCore.Rewrite (7)
Microsoft.AspNetCore.Routing (4)
Microsoft.AspNetCore.Routing.Tests (1)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (17)
Microsoft.AspNetCore.Server.IIS (2)
Microsoft.AspNetCore.Server.IISIntegration (4)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (8)
Microsoft.AspNetCore.SpaServices.Extensions (2)
Microsoft.AspNetCore.StaticAssets (3)
Microsoft.AspNetCore.StaticAssets.Tests (2)
Microsoft.AspNetCore.StaticFiles (2)
Microsoft.AspNetCore.StaticFiles.Tests (3)
Microsoft.AspNetCore.TestHost (1)
Microsoft.AspNetCore.Tests (2)
Microsoft.AspNetCore.WebSockets (1)
Microsoft.AspNetCore.WebSockets.Tests (1)
OpenIdConnectSample (1)
OutputCachingSample (1)
PlaintextApp (1)
RateLimitingSample (1)
RazorPagesWebSite (1)
RoutingSandbox (3)
RoutingWebSite (8)
ServerComparison.TestSites (1)
SignalR.Client.FunctionalTestApp (2)
SocialSample (1)
Sockets.FunctionalTests (1)
StatusCodePagesSample (1)
WebPubSubWeb (3)
475 references to StatusCode
InMemory.FunctionalTests (1)
InProcessWebSite (2)
Microsoft.AspNetCore.Authentication.Cookies (1)
Microsoft.AspNetCore.Authentication.JwtBearer (1)
Microsoft.AspNetCore.Authentication.Negotiate (1)
Microsoft.AspNetCore.Authentication.Negotiate.Test (30)
EventTests.cs (14)
32Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
41Assert.Equal(StatusCodes.Status401Unauthorized, result.Response.StatusCode);
65Assert.Equal(StatusCodes.Status418ImATeapot, result.Response.StatusCode);
113Assert.Equal(StatusCodes.Status418ImATeapot, result.Response.StatusCode);
163Assert.Equal(StatusCodes.Status418ImATeapot, result.Response.StatusCode);
188Assert.Equal(StatusCodes.Status418ImATeapot, response.Response.StatusCode);
213Assert.Equal(StatusCodes.Status418ImATeapot, result.Response.StatusCode);
238Assert.Equal(StatusCodes.Status400BadRequest, response.Response.StatusCode);
263Assert.Equal(StatusCodes.Status418ImATeapot, result.Response.StatusCode);
293Assert.Equal(StatusCodes.Status200OK, result.Response.StatusCode);
339Assert.Equal(StatusCodes.Status401Unauthorized, result.Response.StatusCode);
363Assert.Equal(StatusCodes.Status401Unauthorized, result.Response.StatusCode);
398Assert.Equal(StatusCodes.Status401Unauthorized, result.Response.StatusCode);
405Assert.Equal(StatusCodes.Status200OK, result.Response.StatusCode);
NegotiateHandlerTests.cs (16)
40Assert.Equal(StatusCodes.Status200OK, result.Response.StatusCode);
50Assert.Equal(StatusCodes.Status200OK, result.Response.StatusCode);
60Assert.Equal(StatusCodes.Status401Unauthorized, result.Response.StatusCode);
72Assert.Equal(StatusCodes.Status401Unauthorized, result.Response.StatusCode);
82Assert.Equal(StatusCodes.Status401Unauthorized, result.Response.StatusCode);
164Assert.Equal(StatusCodes.Status200OK, result.Response.StatusCode);
191Assert.Equal(StatusCodes.Status401Unauthorized, result.Response.StatusCode);
289Assert.Equal(StatusCodes.Status500InternalServerError, result.Response.StatusCode);
300Assert.Equal(StatusCodes.Status401Unauthorized, result.Response.StatusCode);
311Assert.Equal(StatusCodes.Status400BadRequest, result.Response.StatusCode);
328Assert.Equal(StatusCodes.Status200OK, result.Response.StatusCode);
336Assert.Equal(StatusCodes.Status200OK, result.Response.StatusCode);
349Assert.Equal(StatusCodes.Status401Unauthorized, result.Response.StatusCode);
356Assert.Equal(StatusCodes.Status200OK, result.Response.StatusCode);
369Assert.Equal(StatusCodes.Status401Unauthorized, result.Response.StatusCode);
376Assert.Equal(StatusCodes.Status200OK, result.Response.StatusCode);
Microsoft.AspNetCore.Components.Endpoints.Tests (7)
Microsoft.AspNetCore.Components.Server.Tests (7)
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (2)
Microsoft.AspNetCore.Cors.Test (2)
Microsoft.AspNetCore.Diagnostics (10)
Microsoft.AspNetCore.Diagnostics.Abstractions (1)
Microsoft.AspNetCore.Diagnostics.Tests (2)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (17)
UnaryServerCallHandlerTests.cs (15)
73Assert.Equal(200, httpContext.Response.StatusCode);
745Assert.Equal(400, httpContext.Response.StatusCode);
783Assert.Equal(400, httpContext.Response.StatusCode);
812Assert.Equal(400, httpContext.Response.StatusCode);
837Assert.Equal(401, httpContext.Response.StatusCode);
862Assert.Equal(401, httpContext.Response.StatusCode);
929Assert.Equal(400, httpContext.Response.StatusCode);
1007Assert.Equal(500, httpContext.Response.StatusCode);
1049Assert.Equal(500, httpContext.Response.StatusCode);
1079Assert.Equal(500, httpContext.Response.StatusCode);
1108Assert.Equal(401, httpContext.Response.StatusCode);
1150Assert.Equal(200, httpContext.Response.StatusCode);
1204Assert.Equal(200, httpContext.Response.StatusCode);
1363Assert.Equal(200, httpContext.Response.StatusCode);
1471Assert.Equal(500, httpContext.Response.StatusCode);
Microsoft.AspNetCore.Hosting (11)
Microsoft.AspNetCore.Http (3)
Microsoft.AspNetCore.Http.Abstractions.Tests (13)
Microsoft.AspNetCore.Http.Connections (1)
Microsoft.AspNetCore.Http.Connections.Tests (46)
HttpConnectionDispatcherTests.cs (42)
320Assert.Equal(StatusCodes.Status404NotFound, context.Response.StatusCode);
361Assert.Equal(StatusCodes.Status404NotFound, context.Response.StatusCode);
399Assert.Equal(StatusCodes.Status405MethodNotAllowed, context.Response.StatusCode);
438Assert.Equal(StatusCodes.Status404NotFound, context.Response.StatusCode);
791Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
869Assert.Equal(StatusCodes.Status400BadRequest, context.Response.StatusCode);
915Assert.Equal(StatusCodes.Status400BadRequest, context.Response.StatusCode);
943Assert.Equal(StatusCodes.Status400BadRequest, context.Response.StatusCode);
1017Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1049Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1076Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1080Assert.Equal(StatusCodes.Status204NoContent, context.Response.StatusCode);
1112Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1116Assert.Equal(StatusCodes.Status204NoContent, context.Response.StatusCode);
1148Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1155Assert.Equal(StatusCodes.Status204NoContent, context.Response.StatusCode);
1201Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1457Assert.Equal(StatusCodes.Status409Conflict, context2.Response.StatusCode);
1515Assert.Equal(StatusCodes.Status204NoContent, context1.Response.StatusCode);
1581Assert.Equal(StatusCodes.Status409Conflict, context1.Response.StatusCode);
1587Assert.Equal(StatusCodes.Status409Conflict, context2.Response.StatusCode);
1625Assert.Equal(StatusCodes.Status404NotFound, context.Response.StatusCode);
1665Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1697Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1726Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1738Assert.Equal(StatusCodes.Status204NoContent, context.Response.StatusCode);
1780Assert.Equal(StatusCodes.Status204NoContent, context1.Response.StatusCode);
1783Assert.Equal(StatusCodes.Status200OK, context2.Response.StatusCode);
1859Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1871Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1911Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
1923Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
2043Assert.Equal(StatusCodes.Status400BadRequest, deleteContext.Response.StatusCode);
2092Assert.Equal(StatusCodes.Status202Accepted, deleteContext.Response.StatusCode);
2134Assert.Equal(StatusCodes.Status202Accepted, deleteContext.Response.StatusCode);
2196Assert.Equal(StatusCodes.Status202Accepted, deleteContext.Response.StatusCode);
2503Assert.Equal(409, context.Response.StatusCode);
2595Assert.Equal(404, context.Response.StatusCode);
2652Assert.Equal(404, context.Response.StatusCode);
2750Assert.Equal(StatusCodes.Status500InternalServerError, pollContext.Response.StatusCode);
2802Assert.Equal(StatusCodes.Status202Accepted, deleteContext.Response.StatusCode);
3713Assert.Equal(status, context.Response.StatusCode);
Microsoft.AspNetCore.Http.Extensions (3)
Microsoft.AspNetCore.Http.Extensions.Tests (83)
HttpResponseJsonExtensionsTests.cs (10)
33Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
104Assert.Equal(StatusCodes.Status418ImATeapot, context.Response.StatusCode);
174Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
256Assert.Equal(StatusCodes.Status418ImATeapot, context.Response.StatusCode);
272Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
297Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
325Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
359Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
393Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
427Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
RequestDelegateFactoryTests.cs (22)
767Assert.Equal(200, httpContext.Response.StatusCode);
896Assert.Equal(400, httpContext.Response.StatusCode);
1580Assert.Equal(400, httpContext.Response.StatusCode);
1589Assert.Equal(200, httpContext.Response.StatusCode);
1679Assert.Equal(400, httpContext.Response.StatusCode);
1695Assert.Equal(200, httpContext.Response.StatusCode);
1754Assert.Equal(200, httpContext.Response.StatusCode);
1788Assert.Equal(200, httpContext.Response.StatusCode);
1818Assert.Equal(200, httpContext.Response.StatusCode);
1848Assert.Equal(200, httpContext.Response.StatusCode);
1875Assert.Equal(200, httpContext.Response.StatusCode);
1915Assert.Equal(200, httpContext.Response.StatusCode);
1951Assert.Equal(413, httpContext.Response.StatusCode);
1984Assert.Equal(413, httpContext.Response.StatusCode);
2180Assert.Equal(200, httpContext.Response.StatusCode);
2223Assert.Equal(200, httpContext.Response.StatusCode);
2294Assert.Equal(200, httpContext.Response.StatusCode);
2389Assert.Equal(200, httpContext.Response.StatusCode);
2426Assert.Equal(400, httpContext.Response.StatusCode);
2508Assert.Equal(200, httpContext.Response.StatusCode);
3152Assert.Equal(200, httpContext.Response.StatusCode);
3199Assert.Equal(400, httpContext.Response.StatusCode);
RequestDelegateGenerator\RequestDelegateCreationTests.Logging.cs (14)
42Assert.Equal(400, httpContext.Response.StatusCode);
105Assert.Equal(400, httpContext.Response.StatusCode);
158Assert.Equal(200, httpContext.Response.StatusCode);
195Assert.Equal(200, httpContext.Response.StatusCode);
226Assert.Equal(400, httpContext.Response.StatusCode);
275Assert.Equal(200, httpContext.Response.StatusCode);
306Assert.Equal(400, httpContext.Response.StatusCode);
354Assert.Equal(200, httpContext.Response.StatusCode);
400Assert.Equal(415, httpContext.Response.StatusCode);
449Assert.Equal(415, httpContext.Response.StatusCode);
526Assert.Equal(400, httpContext.Response.StatusCode);
568Assert.Equal(200, httpContext.Response.StatusCode);
606Assert.Equal(400, httpContext.Response.StatusCode);
647Assert.Equal(200, httpContext.Response.StatusCode);
Microsoft.AspNetCore.Http.Microbenchmarks (3)
Microsoft.AspNetCore.Http.Results.Tests (84)
src\Shared\ResultsTests\FileStreamResultTestBase.cs (10)
62Assert.Equal(StatusCodes.Status206PartialContent, httpResponse.StatusCode);
103Assert.Equal(StatusCodes.Status206PartialContent, httpResponse.StatusCode);
141Assert.Equal(StatusCodes.Status200OK, httpResponse.StatusCode);
178Assert.Equal(StatusCodes.Status200OK, httpResponse.StatusCode);
212Assert.Equal(StatusCodes.Status200OK, httpResponse.StatusCode);
247Assert.Equal(StatusCodes.Status416RangeNotSatisfiable, httpResponse.StatusCode);
283Assert.Equal(StatusCodes.Status412PreconditionFailed, httpResponse.StatusCode);
319Assert.Equal(StatusCodes.Status304NotModified, httpResponse.StatusCode);
363Assert.Equal(StatusCodes.Status416RangeNotSatisfiable, httpResponse.StatusCode);
437Assert.Equal(200, httpContext.Response.StatusCode);
Microsoft.AspNetCore.Http.Tests (8)
Microsoft.AspNetCore.HttpLogging (4)
Microsoft.AspNetCore.Mvc.Core (2)
Microsoft.AspNetCore.Mvc.Core.Test (67)
src\Shared\ResultsTests\FileStreamResultTestBase.cs (10)
62Assert.Equal(StatusCodes.Status206PartialContent, httpResponse.StatusCode);
103Assert.Equal(StatusCodes.Status206PartialContent, httpResponse.StatusCode);
141Assert.Equal(StatusCodes.Status200OK, httpResponse.StatusCode);
178Assert.Equal(StatusCodes.Status200OK, httpResponse.StatusCode);
212Assert.Equal(StatusCodes.Status200OK, httpResponse.StatusCode);
247Assert.Equal(StatusCodes.Status416RangeNotSatisfiable, httpResponse.StatusCode);
283Assert.Equal(StatusCodes.Status412PreconditionFailed, httpResponse.StatusCode);
319Assert.Equal(StatusCodes.Status304NotModified, httpResponse.StatusCode);
363Assert.Equal(StatusCodes.Status416RangeNotSatisfiable, httpResponse.StatusCode);
437Assert.Equal(200, httpContext.Response.StatusCode);
Microsoft.AspNetCore.Mvc.Cors.Test (4)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (5)
Microsoft.AspNetCore.OpenApi.Tests (4)
Microsoft.AspNetCore.OutputCaching.Tests (1)
Microsoft.AspNetCore.Owin.Tests (1)
Microsoft.AspNetCore.RateLimiting.Tests (21)
RateLimitingMiddlewareTests.cs (17)
106Assert.Equal(StatusCodes.Status503ServiceUnavailable, context.Response.StatusCode);
131Assert.Equal(StatusCodes.Status429TooManyRequests, context.Response.StatusCode);
155Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
213Assert.Equal(StatusCodes.Status429TooManyRequests, context.Response.StatusCode);
249Assert.Equal(StatusCodes.Status429TooManyRequests, context.Response.StatusCode);
280Assert.Equal(StatusCodes.Status404NotFound, context.Response.StatusCode);
312Assert.Equal(StatusCodes.Status429TooManyRequests, context.Response.StatusCode);
344Assert.Equal(StatusCodes.Status404NotFound, context.Response.StatusCode);
376Assert.Equal(StatusCodes.Status429TooManyRequests, context.Response.StatusCode);
419Assert.Equal(StatusCodes.Status404NotFound, context.Response.StatusCode);
454Assert.Equal(StatusCodes.Status404NotFound, context.Response.StatusCode);
460Assert.Equal(StatusCodes.Status400BadRequest, context.Response.StatusCode);
505Assert.Equal(StatusCodes.Status429TooManyRequests, context.Response.StatusCode);
541Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
549Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
579Assert.Equal(StatusCodes.Status404NotFound, context.Response.StatusCode);
619Assert.Equal(StatusCodes.Status403Forbidden, context.Response.StatusCode);
Microsoft.AspNetCore.ResponseCaching (3)
Microsoft.AspNetCore.Rewrite (1)
Microsoft.AspNetCore.Rewrite.Tests (2)
Microsoft.AspNetCore.Routing (1)
Microsoft.AspNetCore.Routing.Tests (8)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
Microsoft.AspNetCore.StaticAssets (4)
Microsoft.AspNetCore.StaticFiles (1)
Microsoft.AspNetCore.TestHost (3)
Microsoft.AspNetCore.TestHost.Tests (2)
MiddlewareAnalysisSample (1)