78 implementations of IResult
Aspire.Dashboard (1)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Http.Abstractions (1)
Microsoft.AspNetCore.Http.Extensions.Tests (12)
Microsoft.AspNetCore.Http.Microbenchmarks (5)
Microsoft.AspNetCore.Http.Results (44)
ResultsOfT.Generated.cs (5)
24public sealed class Results<[DynamicallyAccessedMembers(ResultsOfTHelper.RequireMethods)] TResult1, [DynamicallyAccessedMembers(ResultsOfTHelper.RequireMethods)] TResult2> : IResult, INestedHttpResult, IEndpointMetadataProvider
87public sealed class Results<[DynamicallyAccessedMembers(ResultsOfTHelper.RequireMethods)] TResult1, [DynamicallyAccessedMembers(ResultsOfTHelper.RequireMethods)] TResult2, [DynamicallyAccessedMembers(ResultsOfTHelper.RequireMethods)] TResult3> : IResult, INestedHttpResult, IEndpointMetadataProvider
159public sealed class Results<[DynamicallyAccessedMembers(ResultsOfTHelper.RequireMethods)] TResult1, [DynamicallyAccessedMembers(ResultsOfTHelper.RequireMethods)] TResult2, [DynamicallyAccessedMembers(ResultsOfTHelper.RequireMethods)] TResult3, [DynamicallyAccessedMembers(ResultsOfTHelper.RequireMethods)] TResult4> : IResult, INestedHttpResult, IEndpointMetadataProvider
240public sealed class Results<[DynamicallyAccessedMembers(ResultsOfTHelper.RequireMethods)] TResult1, [DynamicallyAccessedMembers(ResultsOfTHelper.RequireMethods)] TResult2, [DynamicallyAccessedMembers(ResultsOfTHelper.RequireMethods)] TResult3, [DynamicallyAccessedMembers(ResultsOfTHelper.RequireMethods)] TResult4, [DynamicallyAccessedMembers(ResultsOfTHelper.RequireMethods)] TResult5> : IResult, INestedHttpResult, IEndpointMetadataProvider
330public sealed class Results<[DynamicallyAccessedMembers(ResultsOfTHelper.RequireMethods)] TResult1, [DynamicallyAccessedMembers(ResultsOfTHelper.RequireMethods)] TResult2, [DynamicallyAccessedMembers(ResultsOfTHelper.RequireMethods)] TResult3, [DynamicallyAccessedMembers(ResultsOfTHelper.RequireMethods)] TResult4, [DynamicallyAccessedMembers(ResultsOfTHelper.RequireMethods)] TResult5, [DynamicallyAccessedMembers(ResultsOfTHelper.RequireMethods)] TResult6> : IResult, INestedHttpResult, IEndpointMetadataProvider
Microsoft.AspNetCore.Http.Results.Tests (8)
Microsoft.AspNetCore.Mvc.Core (1)
Microsoft.AspNetCore.Mvc.Core.Test (4)
Microsoft.AspNetCore.Routing.Tests (1)
313 references to IResult
AzureFunctionsEndToEnd.Functions (1)
BasicWebSite (2)
Microsoft.AspNetCore.App.Analyzers.Test (1)
Microsoft.AspNetCore.Components.Endpoints (2)
Microsoft.AspNetCore.Http.Abstractions (5)
Microsoft.AspNetCore.Http.Extensions (12)
Microsoft.AspNetCore.Http.Extensions.Tests (13)
Microsoft.AspNetCore.Http.Microbenchmarks (1)
Microsoft.AspNetCore.Http.Results (219)
Results.cs (133)
22/// A factory for <see cref="IResult"/>.
27/// Creates an <see cref="IResult"/> that on execution invokes <see cref="AuthenticationHttpContextExtensions.ChallengeAsync(HttpContext, string?, AuthenticationProperties?)" />.
37/// <returns>The created <see cref="IResult"/> for the response.</returns>
38public static IResult Challenge(
44/// Creates a <see cref="IResult"/> that on execution invokes <see cref="AuthenticationHttpContextExtensions.ForbidAsync(HttpContext, string?, AuthenticationProperties?)"/>.
53/// <returns>The created <see cref="IResult"/> for the response.</returns>
58public static IResult Forbid(AuthenticationProperties? properties = null, IList<string>? authenticationSchemes = null)
62/// Creates an <see cref="IResult"/> that on execution invokes <see cref="AuthenticationHttpContextExtensions.SignInAsync(HttpContext, string?, ClaimsPrincipal, AuthenticationProperties?)" />.
67/// <returns>The created <see cref="IResult"/> for the response.</returns>
68public static IResult SignIn(
75/// Creates an <see cref="IResult"/> that on execution invokes <see cref="AuthenticationHttpContextExtensions.SignOutAsync(HttpContext, string?, AuthenticationProperties?)" />.
79/// <returns>The created <see cref="IResult"/> for the response.</returns>
80public static IResult SignOut(AuthenticationProperties? properties = null, IList<string>? authenticationSchemes = null)
92/// <returns>The created <see cref="IResult"/> object for the response.</returns>
97public static IResult Content(string? content, string? contentType, Encoding? contentEncoding)
110/// <returns>The created <see cref="IResult"/> object for the response.</returns>
115public static IResult Content(string? content, string? contentType = null, Encoding? contentEncoding = null, int? statusCode = null)
127/// <returns>The created <see cref="IResult"/> object for the response.</returns>
132public static IResult Text(string? content, string? contentType, Encoding? contentEncoding)
145/// <returns>The created <see cref="IResult"/> object for the response.</returns>
150public static IResult Text(string? content, string? contentType = null, Encoding? contentEncoding = null, int? statusCode = null)
159/// <returns>The created <see cref="IResult"/> object for the response.</returns>
160public static IResult Text(ReadOnlySpan<byte> utf8Content, string? contentType = null, int? statusCode = null)
168/// <returns>The created <see cref="IResult"/> object for the response.</returns>
169public static IResult Content(string? content, MediaTypeHeaderValue contentType)
173/// Creates a <see cref="IResult"/> that serializes the specified <paramref name="data"/> object to JSON.
185public static IResult Json(object? data, JsonSerializerOptions? options = null, string? contentType = null, int? statusCode = null)
189/// Creates a <see cref="IResult"/> that serializes the specified <paramref name="data"/> object to JSON.
200public static IResult Json(object? data, JsonTypeInfo jsonTypeInfo, string? contentType = null, int? statusCode = null)
207/// Creates a <see cref="IResult"/> that serializes the specified <paramref name="data"/> object to JSON.
219public static IResult Json(object? data, Type type, JsonSerializerContext context, string? contentType = null, int? statusCode = null)
229/// Creates a <see cref="IResult"/> that serializes the specified <paramref name="data"/> object to JSON.
241public static IResult Json<TValue>(TValue? data, JsonSerializerOptions? options = null, string? contentType = null, int? statusCode = null)
246/// Creates a <see cref="IResult"/> that serializes the specified <paramref name="data"/> object to JSON.
257public static IResult Json<TValue>(TValue? data, JsonTypeInfo<TValue> jsonTypeInfo, string? contentType = null, int? statusCode = null)
262/// Creates a <see cref="IResult"/> that serializes the specified <paramref name="data"/> object to JSON.
273public static IResult Json<TValue>(TValue? data, JsonSerializerContext context, string? contentType = null, int? statusCode = null)
292/// <returns>The created <see cref="IResult"/> for the response.</returns>
293public static IResult File(
317/// <returns>The created <see cref="IResult"/> for the response.</returns>
318public static IResult Bytes(
340/// <returns>The created <see cref="IResult"/> for the response.</returns>
341public static IResult Bytes(
368/// <returns>The created <see cref="IResult"/> for the response.</returns>
372public static IResult File(
399/// <returns>The created <see cref="IResult"/> for the response.</returns>
403public static IResult Stream(
427/// <returns>The created <see cref="IResult"/> for the response.</returns>
431public static IResult Stream(
450/// <returns>The created <see cref="IResult"/> for the response.</returns>
451public static IResult Stream(
472/// <returns>The created <see cref="IResult"/> for the response.</returns>
473public static IResult File(
504/// <returns>The created <see cref="IResult"/> for the response.</returns>
505public static IResult Redirect([StringSyntax(StringSyntaxAttribute.Uri)] string url, bool permanent = false, bool preserveMethod = false)
528/// <returns>The created <see cref="IResult"/> for the response.</returns>
529public static IResult LocalRedirect([StringSyntax(StringSyntaxAttribute.Uri, UriKind.Relative)] string localUrl, bool permanent = false, bool preserveMethod = false)
554/// <returns>The created <see cref="IResult"/> for the response.</returns>
556public static IResult RedirectToRoute(string? routeName = null, object? routeValues = null, bool permanent = false, bool preserveMethod = false, string? fragment = null)
581/// <returns>The created <see cref="IResult"/> for the response.</returns>
583public static IResult RedirectToRoute(string? routeName, RouteValueDictionary? routeValues, bool permanent = false, bool preserveMethod = false, string? fragment = null)
588/// Creates an <see cref="IResult"/> object by specifying a <paramref name="statusCode"/>.
591/// <returns>The created <see cref="IResult"/> object for the response.</returns>
592public static IResult StatusCode(int statusCode)
599/// <returns>The created <see cref="IResult"/> for the response.</returns>
600public static IResult NotFound(object? value = null)
607/// <returns>The created <see cref="IResult"/> for the response.</returns>
608public static IResult NotFound<TValue>(TValue? value)
614/// <returns>The created <see cref="IResult"/> for the response.</returns>
615public static IResult Unauthorized()
622/// <returns>The created <see cref="IResult"/> for the response.</returns>
623public static IResult BadRequest(object? error = null)
630/// <returns>The created <see cref="IResult"/> for the response.</returns>
631public static IResult BadRequest<TValue>(TValue? error)
638/// <returns>The created <see cref="IResult"/> for the response.</returns>
639public static IResult Conflict(object? error = null)
646/// <returns>The created <see cref="IResult"/> for the response.</returns>
647public static IResult Conflict<TValue>(TValue? error)
653/// <returns>The created <see cref="IResult"/> for the response.</returns>
654public static IResult NoContent()
661/// <returns>The created <see cref="IResult"/> for the response.</returns>
662public static IResult Ok(object? value = null)
669/// <returns>The created <see cref="IResult"/> for the response.</returns>
670public static IResult Ok<TValue>(TValue? value)
677/// <returns>The created <see cref="IResult"/> for the response.</returns>
678public static IResult UnprocessableEntity(object? error = null)
685/// <returns>The created <see cref="IResult"/> for the response.</returns>
686public static IResult UnprocessableEntity<TValue>(TValue? error)
692/// <returns>The created <see cref="IResult"/> for the response.</returns>
693public static IResult InternalServerError()
700/// <returns>The created <see cref="IResult"/> for the response.</returns>
701public static IResult InternalServerError<TValue>(TValue? error)
713/// <returns>The created <see cref="IResult"/> for the response.</returns>
714public static IResult Problem(
732/// <returns>The created <see cref="IResult"/> for the response.</returns>
734public static IResult Problem(
748/// <returns>The created <see cref="IResult"/> for the response.</returns>
749public static IResult Problem(ProblemDetails problemDetails)
763/// <returns>The created <see cref="IResult"/> for the response.</returns>
764public static IResult ValidationProblem(
787/// <returns>The created <see cref="IResult"/> for the response.</returns>
789public static IResult ValidationProblem(
831/// <returns>The created <see cref="IResult"/> for the response.</returns>
832public static IResult Created()
840/// <returns>The created <see cref="IResult"/> for the response.</returns>
841public static IResult Created(string? uri, object? value)
849/// <returns>The created <see cref="IResult"/> for the response.</returns>
850public static IResult Created<TValue>(string? uri, TValue? value)
858/// <returns>The created <see cref="IResult"/> for the response.</returns>
859public static IResult Created(Uri? uri, object? value)
867/// <returns>The created <see cref="IResult"/> for the response.</returns>
868public static IResult Created<TValue>(Uri? uri, TValue? value)
877/// <returns>The created <see cref="IResult"/> for the response.</returns>
879public static IResult CreatedAtRoute(string? routeName = null, object? routeValues = null, object? value = null)
888/// <returns>The created <see cref="IResult"/> for the response.</returns>
890public static IResult CreatedAtRoute(string? routeName, RouteValueDictionary? routeValues, object? value = null)
900/// <returns>The created <see cref="IResult"/> for the response.</returns>
902public static IResult CreatedAtRoute<TValue>(string? routeName = null, object? routeValues = null, TValue? value = default)
911/// <returns>The created <see cref="IResult"/> for the response.</returns>
913public static IResult CreatedAtRoute<TValue>(string? routeName, RouteValueDictionary? routeValues, TValue? value = default)
922/// <returns>The created <see cref="IResult"/> for the response.</returns>
923public static IResult Accepted(string? uri = null, object? value = null)
931/// <returns>The created <see cref="IResult"/> for the response.</returns>
932public static IResult Accepted<TValue>(string? uri = null, TValue? value = default)
941/// <returns>The created <see cref="IResult"/> for the response.</returns>
943public static IResult AcceptedAtRoute(string? routeName = null, object? routeValues = null, object? value = null)
952/// <returns>The created <see cref="IResult"/> for the response.</returns>
954public static IResult AcceptedAtRoute(string? routeName, RouteValueDictionary? routeValues, object? value = null)
964/// <returns>The created <see cref="IResult"/> for the response.</returns>
966public static IResult AcceptedAtRoute<TValue>(string? routeName = null, object? routeValues = null, TValue? value = default)
975/// <returns>The created <see cref="IResult"/> for the response.</returns>
977public static IResult AcceptedAtRoute<TValue>(string? routeName, RouteValueDictionary? routeValues, TValue? value = default)
984public static IResult Empty { get; } = TypedResults.Empty;
Microsoft.AspNetCore.Http.Results.Tests (26)
ResultsOfTTests.Generated.cs (20)
106Results<IResult, ChecksumResult2> MyApi(int id)
131Results<ChecksumResult1, IResult> MyApi(int id)
322Results<IResult, ChecksumResult2, ChecksumResult3> MyApi(int id)
349Results<ChecksumResult1, IResult, ChecksumResult3> MyApi(int id)
376Results<ChecksumResult1, ChecksumResult2, IResult> MyApi(int id)
607Results<IResult, ChecksumResult2, ChecksumResult3, ChecksumResult4> MyApi(int id)
636Results<ChecksumResult1, IResult, ChecksumResult3, ChecksumResult4> MyApi(int id)
665Results<ChecksumResult1, ChecksumResult2, IResult, ChecksumResult4> MyApi(int id)
694Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, IResult> MyApi(int id)
969Results<IResult, ChecksumResult2, ChecksumResult3, ChecksumResult4, ChecksumResult5> MyApi(int id)
1000Results<ChecksumResult1, IResult, ChecksumResult3, ChecksumResult4, ChecksumResult5> MyApi(int id)
1031Results<ChecksumResult1, ChecksumResult2, IResult, ChecksumResult4, ChecksumResult5> MyApi(int id)
1062Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, IResult, ChecksumResult5> MyApi(int id)
1093Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, ChecksumResult4, IResult> MyApi(int id)
1416Results<IResult, ChecksumResult2, ChecksumResult3, ChecksumResult4, ChecksumResult5, ChecksumResult6> MyApi(int id)
1449Results<ChecksumResult1, IResult, ChecksumResult3, ChecksumResult4, ChecksumResult5, ChecksumResult6> MyApi(int id)
1482Results<ChecksumResult1, ChecksumResult2, IResult, ChecksumResult4, ChecksumResult5, ChecksumResult6> MyApi(int id)
1515Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, IResult, ChecksumResult5, ChecksumResult6> MyApi(int id)
1548Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, ChecksumResult4, IResult, ChecksumResult6> MyApi(int id)
1581Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, ChecksumResult4, ChecksumResult5, IResult> MyApi(int id)
Microsoft.AspNetCore.Mvc.ApiExplorer (4)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
Microsoft.AspNetCore.Mvc.Core (10)
Microsoft.AspNetCore.Mvc.Core.Test (9)
Microsoft.AspNetCore.OpenApi (1)
Microsoft.AspNetCore.Routing (1)
MinimalFormSample (1)
MinimalSample (1)
TestProject.IntegrationServiceA (3)