2 instantiations of ContentHttpResult
Microsoft.AspNetCore.Http.Results (2)
TypedResults.cs (2)
173return 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> 101public static ContentHttpResult Content(string? content, string? contentType, Encoding? contentEncoding) 118/// <returns>The created <see cref="ContentHttpResult"/> object for the response.</returns> 119public 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> 136public static ContentHttpResult Text(string? content, string? contentType, Encoding? contentEncoding) 163/// <returns>The created <see cref="ContentHttpResult"/> object for the response.</returns> 164public 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> 182public static ContentHttpResult Content(string? content, MediaTypeHeaderValue contentType)
Microsoft.AspNetCore.Http.Results.Tests (26)
ContentResultTests.cs (3)
23var contentResult = new ContentHttpResult(null, contentType); 110var contentResult = new ContentHttpResult(content, contentType?.ToString()); 130var result = new ContentHttpResult("content", null);
ResultsTests.cs (16)
527var result = Results.Content(content, mediaType) as ContentHttpResult; 544var result = Results.Content(content, contentType, encoding) as ContentHttpResult; 562var result = Results.Content(content, contentType, encoding, statusCode) as ContentHttpResult; 1598var result = Results.Text(content, contentType) as ContentHttpResult; 1648var result = Results.Text(content, contentType, encoding) as ContentHttpResult; 1668var 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)
523var result = TypedResults.Content(content, mediaType); 540var result = TypedResults.Content(content, contentType, encoding); 558var result = TypedResults.Content(content, contentType, encoding, statusCode); 1377var result = TypedResults.Text(content, contentType); 1393var result = TypedResults.Text(content, contentType); 1427var result = TypedResults.Text(content, contentType, encoding); 1447var result = TypedResults.Text(content, contentType, encoding, statusCode);
Microsoft.AspNetCore.Identity (1)
IdentityApiEndpointRouteBuilderExtensions.cs (1)
142routeGroup.MapGet("/confirmEmail", async Task<Results<ContentHttpResult, UnauthorizedHttpResult>>