2 instantiations of ContentHttpResult
Microsoft.AspNetCore.Http.Results (2)
TypedResults.cs (2)
173
return
new
(content, mediaTypeHeaderValue?.ToString(), statusCode);
183
=>
new
(content, contentType.ToString());
40 references to ContentHttpResult
Microsoft.AspNetCore.Http.Results (13)
ContentHttpResult.cs (3)
10
/// An <see cref="
ContentHttpResult
"/> that when executed
16
/// Initializes a new instance of the <see cref="
ContentHttpResult
"/> class with the values.
26
/// Initializes a new instance of the <see cref="
ContentHttpResult
"/> class with the values
TypedResults.cs (10)
100
/// <returns>The created <see cref="
ContentHttpResult
"/> object for the response.</returns>
101
public static
ContentHttpResult
Content(string? content, string? contentType, Encoding? contentEncoding)
118
/// <returns>The created <see cref="
ContentHttpResult
"/> object for the response.</returns>
119
public static
ContentHttpResult
Content(string? content, string? contentType = null, Encoding? contentEncoding = null, int? statusCode = null)
135
/// <returns>The created <see cref="
ContentHttpResult
"/> object for the response.</returns>
136
public static
ContentHttpResult
Text(string? content, string? contentType, Encoding? contentEncoding)
163
/// <returns>The created <see cref="
ContentHttpResult
"/> object for the response.</returns>
164
public static
ContentHttpResult
Text(string? content, string? contentType = null, Encoding? contentEncoding = null, int? statusCode = null)
181
/// <returns>The created <see cref="
ContentHttpResult
"/> object for the response.</returns>
182
public static
ContentHttpResult
Content(string? content, MediaTypeHeaderValue contentType)
Microsoft.AspNetCore.Http.Results.Tests (26)
ContentResultTests.cs (3)
23
var
contentResult = new ContentHttpResult(null, contentType);
110
var
contentResult = new ContentHttpResult(content, contentType?.ToString());
130
var
result = new ContentHttpResult("content", null);
ResultsTests.cs (16)
527
var
result = Results.Content(content, mediaType) as
ContentHttpResult
;
544
var
result = Results.Content(content, contentType, encoding) as
ContentHttpResult
;
562
var
result = Results.Content(content, contentType, encoding, statusCode) as
ContentHttpResult
;
1598
var
result = Results.Text(content, contentType) as
ContentHttpResult
;
1648
var
result = Results.Text(content, contentType, encoding) as
ContentHttpResult
;
1668
var
result = Results.Text(content, contentType, encoding, statusCode) as
ContentHttpResult
;
1742
(() => Results.Content("content", null, null), typeof(
ContentHttpResult
)),
1743
(() => Results.Content("content", null, null, null), typeof(
ContentHttpResult
)),
1768
(() => Results.Text("content", null, null), typeof(
ContentHttpResult
)),
1769
(() => Results.Text("content", null, null, null), typeof(
ContentHttpResult
)),
TypedResultsTests.cs (7)
523
var
result = TypedResults.Content(content, mediaType);
540
var
result = TypedResults.Content(content, contentType, encoding);
558
var
result = TypedResults.Content(content, contentType, encoding, statusCode);
1377
var
result = TypedResults.Text(content, contentType);
1393
var
result = TypedResults.Text(content, contentType);
1427
var
result = TypedResults.Text(content, contentType, encoding);
1447
var
result = TypedResults.Text(content, contentType, encoding, statusCode);
Microsoft.AspNetCore.Identity (1)
IdentityApiEndpointRouteBuilderExtensions.cs (1)
142
routeGroup.MapGet("/confirmEmail", async Task<Results<
ContentHttpResult
, UnauthorizedHttpResult>>