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