2 instantiations of Results
Microsoft.AspNetCore.Http.Results (2)
ResultsOfT.Generated.cs (2)
56public static implicit operator Results<TResult1, TResult2>(TResult1 result) => new(result); 62public static implicit operator Results<TResult1, TResult2>(TResult2 result) => new(result);
94 references to Results
Microsoft.AspNetCore.Http.Results (4)
ResultsOfT.Generated.cs (4)
53/// Converts the <typeparamref name="TResult1"/> to a <see cref="Results{TResult1, TResult2}" />. 56public static implicit operator Results<TResult1, TResult2>(TResult1 result) => new(result); 59/// Converts the <typeparamref name="TResult2"/> to a <see cref="Results{TResult1, TResult2}" />. 62public static implicit operator Results<TResult1, TResult2>(TResult2 result) => new(result);
Microsoft.AspNetCore.Http.Results.Tests (82)
ResultsOfTTests.Generated.cs (82)
22Results<ChecksumResult1, ChecksumResult2> MyApi(int id) 32var result = MyApi(input); 44Results<ChecksumResult1, ChecksumResult2> MyApi(int checksum) 55var result = MyApi(input); 66Results<ChecksumResult1, NoContent> MyApi() 73var result = MyApi(); 85Results<ChecksumResult1, NoContent> MyApi() 92var result = MyApi(); 106Results<IResult, ChecksumResult2> MyApi(int id) 117var result = MyApi(input); 131Results<ChecksumResult1, IResult> MyApi(int id) 142var result = MyApi(input); 151[InlineData(1, typeof(Results<ChecksumResult1, ChecksumResult2>))] 152[InlineData(2, typeof(Results<ChecksumResult1, ChecksumResult2>))] 157Results<Results<ChecksumResult1, ChecksumResult2>, ChecksumResult3> MyApi(int id) 1611 => (Results<ChecksumResult1, ChecksumResult2>)new ChecksumResult1(1), 1622 => (Results<ChecksumResult1, ChecksumResult2>)new ChecksumResult2(2), 169var result = MyApi(input); 178[InlineData(1, typeof(Results<ChecksumResult1, ChecksumResult2>))] 179[InlineData(2, typeof(Results<ChecksumResult1, ChecksumResult2>))] 184Results<Results<ChecksumResult1, ChecksumResult2>, ChecksumResult3> MyApi(int id) 1881 => (Results<ChecksumResult1, ChecksumResult2>)new ChecksumResult1(1), 1892 => (Results<ChecksumResult1, ChecksumResult2>)new ChecksumResult2(2), 196var result = MyApi(input); 208Results<ProvidesMetadataResult1, ProvidesMetadataResult2> MyApi() { throw new NotImplementedException(); } 212PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2>>(((Delegate)MyApi).GetMethodInfo(), builder); 223Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2>>(null, new RouteEndpointBuilder(requestDelegate: null, RoutePatternFactory.Parse("/"), order: 0))); 224Assert.Throws<ArgumentNullException>("builder", () => PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2>>(((Delegate)GeneratedCodeIsUpToDate).GetMethodInfo(), null)); 281Results<ChecksumResult1, NoContent> MyApi() 288var result = MyApi(); 300Results<ChecksumResult1, NoContent> MyApi() 307var result = MyApi(); 404Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>, ChecksumResult4> MyApi(int id) 417var result = MyApi(input); 433Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>, ChecksumResult4> MyApi(int id) 446var result = MyApi(input); 462Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>, ChecksumResult4> MyApi(int id) 475var result = MyApi(input); 565Results<ChecksumResult1, NoContent> MyApi() 572var result = MyApi(); 584Results<ChecksumResult1, NoContent> MyApi() 591var result = MyApi(); 724Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, ChecksumResult4>, ChecksumResult5> MyApi(int id) 738var result = MyApi(input); 755Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, ChecksumResult4>, ChecksumResult5> MyApi(int id) 769var result = MyApi(input); 786Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, ChecksumResult4>, ChecksumResult5> MyApi(int id) 800var result = MyApi(input); 817Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, ChecksumResult4>, ChecksumResult5> MyApi(int id) 831var result = MyApi(input); 926Results<ChecksumResult1, NoContent> MyApi() 933var result = MyApi(); 945Results<ChecksumResult1, NoContent> MyApi() 952var result = MyApi(); 1125Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, ChecksumResult4, ChecksumResult5>, ChecksumResult6> MyApi(int id) 1140var result = MyApi(input); 1158Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, ChecksumResult4, ChecksumResult5>, ChecksumResult6> MyApi(int id) 1173var result = MyApi(input); 1191Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, ChecksumResult4, ChecksumResult5>, ChecksumResult6> MyApi(int id) 1206var result = MyApi(input); 1224Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, ChecksumResult4, ChecksumResult5>, ChecksumResult6> MyApi(int id) 1239var result = MyApi(input); 1257Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, ChecksumResult4, ChecksumResult5>, ChecksumResult6> MyApi(int id) 1272var result = MyApi(input); 1372Results<ChecksumResult1, NoContent> MyApi() 1379var result = MyApi(); 1391Results<ChecksumResult1, NoContent> MyApi() 1398var result = MyApi(); 1615Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, ChecksumResult4, ChecksumResult5, ChecksumResult6>, ChecksumResult7> MyApi(int id) 1631var result = MyApi(input); 1650Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, ChecksumResult4, ChecksumResult5, ChecksumResult6>, ChecksumResult7> MyApi(int id) 1666var result = MyApi(input); 1685Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, ChecksumResult4, ChecksumResult5, ChecksumResult6>, ChecksumResult7> MyApi(int id) 1701var result = MyApi(input); 1720Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, ChecksumResult4, ChecksumResult5, ChecksumResult6>, ChecksumResult7> MyApi(int id) 1736var result = MyApi(input); 1755Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, ChecksumResult4, ChecksumResult5, ChecksumResult6>, ChecksumResult7> MyApi(int id) 1771var result = MyApi(input); 1790Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3, ChecksumResult4, ChecksumResult5, ChecksumResult6>, ChecksumResult7> MyApi(int id) 1806var result = MyApi(input);
Microsoft.AspNetCore.Identity (4)
IdentityApiEndpointRouteBuilderExtensions.cs (4)
57routeGroup.MapPost("/register", async Task<Results<Ok, ValidationProblem>> 142routeGroup.MapGet("/confirmEmail", async Task<Results<ContentHttpResult, UnauthorizedHttpResult>> 206routeGroup.MapPost("/forgotPassword", async Task<Results<Ok, ValidationProblem>> 225routeGroup.MapPost("/resetPassword", async Task<Results<Ok, ValidationProblem>>
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (2)
EndpointMetadataApiDescriptionProviderTest.cs (2)
280var apiDescription = GetApiDescription(Results<Created<InferredJsonClass>, BadRequest> () => 388async Task<Results<Created<InferredJsonClass>, ProblemHttpResult>> () =>
Microsoft.AspNetCore.OpenApi.Tests (1)
Extensions\JsonTypeInfoExtensionsTests.cs (1)
48[typeof(Results<Ok<TodoWithDueDate>, Ok<Todo>>), "ResultsOfOkOfTodoWithDueDateAndOkOfTodo"],
Sample (1)
Program.cs (1)
100schemas.MapGet("/multiple-results", Results<Ok<Triangle>, NotFound<string>> () => Random.Shared.Next(0, 2) == 0