63 instantiations of StatusCodeHttpResult
Microsoft.AspNetCore.Http.Results (63)
ResultsCache.StatusCodes.cs (63)
83
return new
StatusCodeHttpResult
(statusCode);
88
StatusCodes.Status101SwitchingProtocols => _status101SwitchingProtocols ??=
new
(StatusCodes.Status101SwitchingProtocols),
89
StatusCodes.Status102Processing => _status102Processing ??=
new
(StatusCodes.Status102Processing),
90
StatusCodes.Status200OK => _status200OK ??=
new
(StatusCodes.Status200OK),
91
StatusCodes.Status201Created => _status201Created ??=
new
(StatusCodes.Status201Created),
92
StatusCodes.Status202Accepted => _status202Accepted ??=
new
(StatusCodes.Status202Accepted),
93
StatusCodes.Status203NonAuthoritative => _status203NonAuthoritative ??=
new
(StatusCodes.Status203NonAuthoritative),
94
StatusCodes.Status204NoContent => _status204NoContent ??=
new
(StatusCodes.Status204NoContent),
95
StatusCodes.Status205ResetContent => _status205ResetContent ??=
new
(StatusCodes.Status205ResetContent),
96
StatusCodes.Status206PartialContent => _status206PartialContent ??=
new
(StatusCodes.Status206PartialContent),
97
StatusCodes.Status207MultiStatus => _status207MultiStatus ??=
new
(StatusCodes.Status207MultiStatus),
98
StatusCodes.Status208AlreadyReported => _status208AlreadyReported ??=
new
(StatusCodes.Status208AlreadyReported),
99
StatusCodes.Status226IMUsed => _status226IMUsed ??=
new
(StatusCodes.Status226IMUsed),
100
StatusCodes.Status300MultipleChoices => _status300MultipleChoices ??=
new
(StatusCodes.Status300MultipleChoices),
101
StatusCodes.Status301MovedPermanently => _status301MovedPermanently ??=
new
(StatusCodes.Status301MovedPermanently),
102
StatusCodes.Status302Found => _status302Found ??=
new
(StatusCodes.Status302Found),
103
StatusCodes.Status303SeeOther => _status303SeeOther ??=
new
(StatusCodes.Status303SeeOther),
104
StatusCodes.Status304NotModified => _status304NotModified ??=
new
(StatusCodes.Status304NotModified),
105
StatusCodes.Status305UseProxy => _status305UseProxy ??=
new
(StatusCodes.Status305UseProxy),
106
StatusCodes.Status306SwitchProxy => _status306SwitchProxy ??=
new
(StatusCodes.Status306SwitchProxy),
107
StatusCodes.Status307TemporaryRedirect => _status307TemporaryRedirect ??=
new
(StatusCodes.Status307TemporaryRedirect),
108
StatusCodes.Status308PermanentRedirect => _status308PermanentRedirect ??=
new
(StatusCodes.Status308PermanentRedirect),
109
StatusCodes.Status400BadRequest => _status400BadRequest ??=
new
(StatusCodes.Status400BadRequest),
110
StatusCodes.Status401Unauthorized => _status401Unauthorized ??=
new
(StatusCodes.Status401Unauthorized),
111
StatusCodes.Status402PaymentRequired => _status402PaymentRequired ??=
new
(StatusCodes.Status402PaymentRequired),
112
StatusCodes.Status403Forbidden => _status403Forbidden ??=
new
(StatusCodes.Status403Forbidden),
113
StatusCodes.Status404NotFound => _status404NotFound ??=
new
(StatusCodes.Status404NotFound),
114
StatusCodes.Status405MethodNotAllowed => _status405MethodNotAllowed ??=
new
(StatusCodes.Status405MethodNotAllowed),
115
StatusCodes.Status406NotAcceptable => _status406NotAcceptable ??=
new
(StatusCodes.Status406NotAcceptable),
116
StatusCodes.Status407ProxyAuthenticationRequired => _status407ProxyAuthenticationRequired ??=
new
(StatusCodes.Status407ProxyAuthenticationRequired),
117
StatusCodes.Status408RequestTimeout => _status408RequestTimeout ??=
new
(StatusCodes.Status408RequestTimeout),
118
StatusCodes.Status409Conflict => _status409Conflict ??=
new
(StatusCodes.Status409Conflict),
119
StatusCodes.Status410Gone => _status410Gone ??=
new
(StatusCodes.Status410Gone),
120
StatusCodes.Status411LengthRequired => _status411LengthRequired ??=
new
(StatusCodes.Status411LengthRequired),
121
StatusCodes.Status412PreconditionFailed => _status412PreconditionFailed ??=
new
(StatusCodes.Status412PreconditionFailed),
122
StatusCodes.Status413RequestEntityTooLarge => _status413RequestEntityTooLarge ??=
new
(StatusCodes.Status413RequestEntityTooLarge),
123
StatusCodes.Status414RequestUriTooLong => _status414RequestUriTooLong ??=
new
(StatusCodes.Status414RequestUriTooLong),
124
StatusCodes.Status415UnsupportedMediaType => _status415UnsupportedMediaType ??=
new
(StatusCodes.Status415UnsupportedMediaType),
125
StatusCodes.Status416RequestedRangeNotSatisfiable => _status416RequestedRangeNotSatisfiable ??=
new
(StatusCodes.Status416RequestedRangeNotSatisfiable),
126
StatusCodes.Status417ExpectationFailed => _status417ExpectationFailed ??=
new
(StatusCodes.Status417ExpectationFailed),
127
StatusCodes.Status418ImATeapot => _status418ImATeapot ??=
new
(StatusCodes.Status418ImATeapot),
128
StatusCodes.Status419AuthenticationTimeout => _status419AuthenticationTimeout ??=
new
(StatusCodes.Status419AuthenticationTimeout),
129
StatusCodes.Status421MisdirectedRequest => _status421MisdirectedRequest ??=
new
(StatusCodes.Status421MisdirectedRequest),
130
StatusCodes.Status422UnprocessableEntity => _status422UnprocessableEntity ??=
new
(StatusCodes.Status422UnprocessableEntity),
131
StatusCodes.Status423Locked => _status423Locked ??=
new
(StatusCodes.Status423Locked),
132
StatusCodes.Status424FailedDependency => _status424FailedDependency ??=
new
(StatusCodes.Status424FailedDependency),
133
StatusCodes.Status426UpgradeRequired => _status426UpgradeRequired ??=
new
(StatusCodes.Status426UpgradeRequired),
134
StatusCodes.Status428PreconditionRequired => _status428PreconditionRequired ??=
new
(StatusCodes.Status428PreconditionRequired),
135
StatusCodes.Status429TooManyRequests => _status429TooManyRequests ??=
new
(StatusCodes.Status429TooManyRequests),
136
StatusCodes.Status431RequestHeaderFieldsTooLarge => _status431RequestHeaderFieldsTooLarge ??=
new
(StatusCodes.Status431RequestHeaderFieldsTooLarge),
137
StatusCodes.Status451UnavailableForLegalReasons => _status451UnavailableForLegalReasons ??=
new
(StatusCodes.Status451UnavailableForLegalReasons),
138
StatusCodes.Status500InternalServerError => _status500InternalServerError ??=
new
(StatusCodes.Status500InternalServerError),
139
StatusCodes.Status501NotImplemented => _status501NotImplemented ??=
new
(StatusCodes.Status501NotImplemented),
140
StatusCodes.Status502BadGateway => _status502BadGateway ??=
new
(StatusCodes.Status502BadGateway),
141
StatusCodes.Status503ServiceUnavailable => _status503ServiceUnavailable ??=
new
(StatusCodes.Status503ServiceUnavailable),
142
StatusCodes.Status504GatewayTimeout => _status504GatewayTimeout ??=
new
(StatusCodes.Status504GatewayTimeout),
143
StatusCodes.Status505HttpVersionNotsupported => _status505HttpVersionNotsupported ??=
new
(StatusCodes.Status505HttpVersionNotsupported),
144
StatusCodes.Status506VariantAlsoNegotiates => _status506VariantAlsoNegotiates ??=
new
(StatusCodes.Status506VariantAlsoNegotiates),
145
StatusCodes.Status507InsufficientStorage => _status507InsufficientStorage ??=
new
(StatusCodes.Status507InsufficientStorage),
146
StatusCodes.Status508LoopDetected => _status508LoopDetected ??=
new
(StatusCodes.Status508LoopDetected),
147
StatusCodes.Status510NotExtended => _status510NotExtended ??=
new
(StatusCodes.Status510NotExtended),
148
StatusCodes.Status511NetworkAuthenticationRequired => _status511NetworkAuthenticationRequired ??=
new
(StatusCodes.Status511NetworkAuthenticationRequired),
149
_ => new
StatusCodeHttpResult
(statusCode),
72 references to StatusCodeHttpResult
Microsoft.AspNetCore.Http.Results (66)
ResultsCache.StatusCodes.cs (62)
15
private static
StatusCodeHttpResult
? _status101SwitchingProtocols;
16
private static
StatusCodeHttpResult
? _status102Processing;
17
private static
StatusCodeHttpResult
? _status200OK;
18
private static
StatusCodeHttpResult
? _status201Created;
19
private static
StatusCodeHttpResult
? _status202Accepted;
20
private static
StatusCodeHttpResult
? _status203NonAuthoritative;
21
private static
StatusCodeHttpResult
? _status204NoContent;
22
private static
StatusCodeHttpResult
? _status205ResetContent;
23
private static
StatusCodeHttpResult
? _status206PartialContent;
24
private static
StatusCodeHttpResult
? _status207MultiStatus;
25
private static
StatusCodeHttpResult
? _status208AlreadyReported;
26
private static
StatusCodeHttpResult
? _status226IMUsed;
27
private static
StatusCodeHttpResult
? _status300MultipleChoices;
28
private static
StatusCodeHttpResult
? _status301MovedPermanently;
29
private static
StatusCodeHttpResult
? _status302Found;
30
private static
StatusCodeHttpResult
? _status303SeeOther;
31
private static
StatusCodeHttpResult
? _status304NotModified;
32
private static
StatusCodeHttpResult
? _status305UseProxy;
33
private static
StatusCodeHttpResult
? _status306SwitchProxy;
34
private static
StatusCodeHttpResult
? _status307TemporaryRedirect;
35
private static
StatusCodeHttpResult
? _status308PermanentRedirect;
36
private static
StatusCodeHttpResult
? _status400BadRequest;
37
private static
StatusCodeHttpResult
? _status401Unauthorized;
38
private static
StatusCodeHttpResult
? _status402PaymentRequired;
39
private static
StatusCodeHttpResult
? _status403Forbidden;
40
private static
StatusCodeHttpResult
? _status404NotFound;
41
private static
StatusCodeHttpResult
? _status405MethodNotAllowed;
42
private static
StatusCodeHttpResult
? _status406NotAcceptable;
43
private static
StatusCodeHttpResult
? _status407ProxyAuthenticationRequired;
44
private static
StatusCodeHttpResult
? _status408RequestTimeout;
45
private static
StatusCodeHttpResult
? _status409Conflict;
46
private static
StatusCodeHttpResult
? _status410Gone;
47
private static
StatusCodeHttpResult
? _status411LengthRequired;
48
private static
StatusCodeHttpResult
? _status412PreconditionFailed;
49
private static
StatusCodeHttpResult
? _status413RequestEntityTooLarge;
50
private static
StatusCodeHttpResult
? _status414RequestUriTooLong;
51
private static
StatusCodeHttpResult
? _status415UnsupportedMediaType;
52
private static
StatusCodeHttpResult
? _status416RequestedRangeNotSatisfiable;
53
private static
StatusCodeHttpResult
? _status417ExpectationFailed;
54
private static
StatusCodeHttpResult
? _status418ImATeapot;
55
private static
StatusCodeHttpResult
? _status419AuthenticationTimeout;
56
private static
StatusCodeHttpResult
? _status421MisdirectedRequest;
57
private static
StatusCodeHttpResult
? _status422UnprocessableEntity;
58
private static
StatusCodeHttpResult
? _status423Locked;
59
private static
StatusCodeHttpResult
? _status424FailedDependency;
60
private static
StatusCodeHttpResult
? _status426UpgradeRequired;
61
private static
StatusCodeHttpResult
? _status428PreconditionRequired;
62
private static
StatusCodeHttpResult
? _status429TooManyRequests;
63
private static
StatusCodeHttpResult
? _status431RequestHeaderFieldsTooLarge;
64
private static
StatusCodeHttpResult
? _status451UnavailableForLegalReasons;
65
private static
StatusCodeHttpResult
? _status500InternalServerError;
66
private static
StatusCodeHttpResult
? _status501NotImplemented;
67
private static
StatusCodeHttpResult
? _status502BadGateway;
68
private static
StatusCodeHttpResult
? _status503ServiceUnavailable;
69
private static
StatusCodeHttpResult
? _status504GatewayTimeout;
70
private static
StatusCodeHttpResult
? _status505HttpVersionNotsupported;
71
private static
StatusCodeHttpResult
? _status506VariantAlsoNegotiates;
72
private static
StatusCodeHttpResult
? _status507InsufficientStorage;
73
private static
StatusCodeHttpResult
? _status508LoopDetected;
74
private static
StatusCodeHttpResult
? _status510NotExtended;
75
private static
StatusCodeHttpResult
? _status511NetworkAuthenticationRequired;
77
internal static
StatusCodeHttpResult
StatusCode(int statusCode)
StatusCodeHttpResult.cs (1)
16
/// Initializes a new instance of the <see cref="
StatusCodeHttpResult
"/> class
TypedResults.cs (3)
644
/// Creates a <see cref="
StatusCodeHttpResult
"/> object by specifying a <paramref name="statusCode"/>.
647
/// <returns>The created <see cref="
StatusCodeHttpResult
"/> object for the response.</returns>
648
public static
StatusCodeHttpResult
StatusCode(int statusCode)
Microsoft.AspNetCore.Http.Results.Tests (6)
ResultsTests.cs (3)
1584
var
result = Results.StatusCode(statusCode) as
StatusCodeHttpResult
;
1776
(() => Results.StatusCode(200), typeof(
StatusCodeHttpResult
)),
StatusCodeResultTests.cs (2)
16
var
result = new StatusCodeHttpResult(StatusCodes.Status404NotFound);
31
var
result = new StatusCodeHttpResult(200);
TypedResultsTests.cs (1)
1363
var
result = TypedResults.StatusCode(statusCode);