3 instantiations of Results
Microsoft.AspNetCore.Http.Results (3)
ResultsOfT.Generated.cs (3)
120public static implicit operator Results<TResult1, TResult2, TResult3>(TResult1 result) => new(result); 126public static implicit operator Results<TResult1, TResult2, TResult3>(TResult2 result) => new(result); 132public static implicit operator Results<TResult1, TResult2, TResult3>(TResult3 result) => new(result);
46 references to Results
Microsoft.AspNetCore.Http.Results (6)
ResultsOfT.Generated.cs (6)
117/// Converts the <typeparamref name="TResult1"/> to a <see cref="Results{TResult1, TResult2, TResult3}" />. 120public static implicit operator Results<TResult1, TResult2, TResult3>(TResult1 result) => new(result); 123/// Converts the <typeparamref name="TResult2"/> to a <see cref="Results{TResult1, TResult2, TResult3}" />. 126public static implicit operator Results<TResult1, TResult2, TResult3>(TResult2 result) => new(result); 129/// Converts the <typeparamref name="TResult3"/> to a <see cref="Results{TResult1, TResult2, TResult3}" />. 132public static implicit operator Results<TResult1, TResult2, TResult3>(TResult3 result) => new(result);
Microsoft.AspNetCore.Http.Results.Tests (35)
ResultsOfTTests.Generated.cs (35)
234Results<ChecksumResult1, ChecksumResult2, ChecksumResult3> MyApi(int id) 245var result = MyApi(input); 258Results<ChecksumResult1, ChecksumResult2, ChecksumResult3> MyApi(int checksum) 270var result = MyApi(input); 322Results<IResult, ChecksumResult2, ChecksumResult3> MyApi(int id) 334var result = MyApi(input); 349Results<ChecksumResult1, IResult, ChecksumResult3> MyApi(int id) 361var result = MyApi(input); 376Results<ChecksumResult1, ChecksumResult2, IResult> MyApi(int id) 388var result = MyApi(input); 397[InlineData(1, typeof(Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>))] 398[InlineData(2, typeof(Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>))] 399[InlineData(3, typeof(Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>))] 404Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>, ChecksumResult4> MyApi(int id) 4081 => (Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>)new ChecksumResult1(1), 4092 => (Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>)new ChecksumResult2(2), 4103 => (Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>)new ChecksumResult3(3), 426[InlineData(1, typeof(Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>))] 427[InlineData(2, typeof(Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>))] 428[InlineData(3, typeof(Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>))] 433Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>, ChecksumResult4> MyApi(int id) 4371 => (Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>)new ChecksumResult1(1), 4382 => (Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>)new ChecksumResult2(2), 4393 => (Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>)new ChecksumResult3(3), 455[InlineData(1, typeof(Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>))] 456[InlineData(2, typeof(Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>))] 457[InlineData(3, typeof(Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>))] 462Results<Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>, ChecksumResult4> MyApi(int id) 4661 => (Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>)new ChecksumResult1(1), 4672 => (Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>)new ChecksumResult2(2), 4683 => (Results<ChecksumResult1, ChecksumResult2, ChecksumResult3>)new ChecksumResult3(3), 487Results<ProvidesMetadataResult1, ProvidesMetadataResult2, ProvidesMetadataResult3> MyApi() { throw new NotImplementedException(); } 491PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2, ProvidesMetadataResult3>>(((Delegate)MyApi).GetMethodInfo(), builder); 503Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2, ProvidesMetadataResult3>>(null, new RouteEndpointBuilder(requestDelegate: null, RoutePatternFactory.Parse("/"), order: 0))); 504Assert.Throws<ArgumentNullException>("builder", () => PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2, ProvidesMetadataResult3>>(((Delegate)GeneratedCodeIsUpToDate).GetMethodInfo(), null));
Microsoft.AspNetCore.Identity (4)
IdentityApiEndpointRouteBuilderExtensions.cs (4)
90routeGroup.MapPost("/login", async Task<Results<Ok<AccessTokenResponse>, EmptyHttpResult, ProblemHttpResult>> 260accountGroup.MapPost("/2fa", async Task<Results<Ok<TwoFactorResponse>, ValidationProblem, NotFound>> 336accountGroup.MapGet("/info", async Task<Results<Ok<InfoResponse>, ValidationProblem, NotFound>> 348accountGroup.MapPost("/info", async Task<Results<Ok<InfoResponse>, ValidationProblem, NotFound>>
MinimalSample (1)
Program.cs (1)
72app.MapGet("/todo/{id}", Results<Ok<Todo>, NotFound, BadRequest> (int id) => id switch