5 types derived from Todo
Microsoft.AspNetCore.Http.Extensions.Tests (5)
RequestDelegateFactoryTests.cs (1)
3540
private class JsonTodo :
Todo
RequestDelegateGenerator\SharedTypes.cs (4)
63
public class TryParseTodo :
Todo
87
public class JsonTodo :
Todo
200
public class CustomTodo :
Todo
1024
public class TodoChild :
Todo
13 instantiations of Todo
Microsoft.AspNetCore.Http.Extensions.Tests (13)
RequestDelegateFactoryTests.cs (3)
843
Todo originalTodo =
new
()
3228
var @delegate = (string task) => new
Todo
();
3248
var @delegate = (string task) => new
Todo
();
RequestDelegateGenerator\RequestDelegateCreationTests.BindAsync.cs (2)
204
Todo originalTodo =
new
()
260
Todo originalTodo =
new
()
RequestDelegateGenerator\RequestDelegateCreationTests.Filters.cs (1)
267
var httpContext = CreateHttpContextWithBody(new
Todo
{ Name = "Write tests", IsComplete = true });
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBody.cs (2)
19
var todo = new
Todo
()
117
var todo = new
Todo
()
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBodyOrService.cs (3)
19
var todo = new
Todo
()
71
var requestData = new
Todo
122
var todo = new
Todo
() { Name = "Default Todo" };
RequestDelegateGenerator\RequestDelegateCreationTests.Logging.cs (1)
429
Todo originalTodo =
new
()
RequestDelegateGenerator\SharedTypes.cs (1)
987
var todo = new
Todo
();
56 references to Todo
Microsoft.AspNetCore.Http.Extensions.Tests (56)
RequestDelegateFactoryTests.cs (25)
779
private record ParametersListWithExplictFromBody(HttpContext HttpContext, [FromBody]
Todo
Todo);
785
void TestImpliedFromBody(HttpContext httpContext,
Todo
todo)
807
new[] { (Action<HttpContext,
Todo
>)TestImpliedFromBody },
843
Todo
originalTodo = new()
929
void TestInferredInvalidAction(
Todo
value1,
Todo
value2) { }
930
void TestBothInvalidAction(
Todo
value1, [FromBody] int value2) { }
1394
[JsonSerializable(typeof(
Todo
))]
1959
void TestAction(
Todo
todo)
1990
void TestFormFileAndJson(IFormFile value1,
Todo
value2) { }
1991
void TestFormFilesAndJson(IFormFile value1, IFormFile value2,
Todo
value3) { }
1992
void TestFormFileCollectionAndJson(IFormFileCollection value1,
Todo
value2) { }
1994
void TestFormCollectionAndJson(IFormCollection value1,
Todo
value2) { }
1995
void TestFormWithAttributeAndJson([FromForm] string value1,
Todo
value2) { }
1996
void TestJsonAndFormFile(
Todo
value1, IFormFile value2) { }
1997
void TestJsonAndFormFiles(
Todo
value1, IFormFile value2, IFormFile value3) { }
1998
void TestJsonAndFormFileCollection(
Todo
value1, IFormFileCollection value2) { }
1999
void TestJsonAndFormFileWithAttribute(
Todo
value1, [FromForm] IFormFile value2) { }
2000
void TestJsonAndFormCollection(
Todo
value1, IFormCollection value2) { }
2001
void TestJsonAndFormWithAttribute(
Todo
value1, [FromForm] string value2) { }
2938
var @delegate = (
Todo
todo) => new RemovesAcceptsMetadataResult();
2951
var @delegate = (
Todo
todo) => Task.FromResult(new RemovesAcceptsMetadataResult());
2964
var @delegate = (
Todo
todo) => ValueTask.FromResult(new RemovesAcceptsMetadataResult());
2977
var @delegate = (
Todo
todo) => FSharp.Core.ExtraTopLevelOperators.DefaultAsyncBuilder.Return(new RemovesAcceptsMetadataResult());
3017
var @delegate = (
Todo
todo) => new AccessesServicesMetadataResult();
RequestDelegateGenerator\CompileTimeIncrementalityTests.cs (2)
67
var source = $"""app.MapGet("/", ([{typeof(FromBodyAttribute)}] {typeof(
Todo
)} todo) => TypedResults.Ok(todo));""";
70
app.MapGet("/", ([{typeof(FromBodyAttribute)}] {typeof(
Todo
)}? todo) => TypedResults.Ok(todo));
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
219
internal HttpContext CreateHttpContextWithBody(
Todo
requestData, IServiceProvider serviceProvider = null)
RequestDelegateGenerator\RequestDelegateCreationTests.BindAsync.cs (8)
204
Todo
originalTodo = new()
252
var
todo = httpContext.Items["todo"] as
Todo
;
260
Todo
originalTodo = new()
305
var
todo0 = httpContext.Items["customTodo"] as
Todo
;
308
var
todo1 = httpContext.Items["todo"] as
Todo
;
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBody.cs (3)
19
var
todo = new Todo()
79
public async Task MapAction_ExplicitBodyParam_ComplexReturn(string source,
Todo
requestData, int expectedStatusCode, string expectedBody)
117
var
todo = new Todo()
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBodyOrService.cs (4)
19
var
todo = new Todo()
45
public async Task MapAction_JsonBodyOrService_SimpleReturn(string source, bool hasBody,
Todo
requestData, bool hasService, int expectedStatusCode, string expectedBody)
71
var
requestData = new Todo
122
var
todo = new Todo() { Name = "Default Todo" };
RequestDelegateGenerator\RequestDelegateCreationTests.Logging.cs (1)
429
Todo
originalTodo = new()
RequestDelegateGenerator\RequestDelegateCreationTests.Metadata.cs (2)
52
Assert.Equal(typeof(
Todo
), metadata.Type);
279
var @delegate = (
Todo
todo) => new RemovesAcceptsMetadataResult();
RequestDelegateGenerator\RequestDelegateCreationTests.Responses.cs (4)
315
var
deserializedResponseBody = JsonSerializer.Deserialize<
Todo
>(((MemoryStream)httpContext.Response.Body).ToArray(), new JsonSerializerOptions
391
await VerifyResponseJsonBodyAsync<
Todo
>(httpContext, (todo) =>
467
await VerifyResponseJsonBodyAsync<
Todo
>(httpContext, (todo) =>
RequestDelegateGenerator\RequestDelegateCreationTests.SpecialTypes.cs (1)
167
new object[] { "Todo?", "default", default(
Todo
), false },
RequestDelegateGenerator\RuntimeCreationTests.ComplexFormBinding.cs (2)
38
await VerifyResponseJsonBodyAsync<
Todo
>(httpContext, (todo) =>
74
await VerifyResponseJsonBodyAsync<
Todo
>(httpContext, (todo) =>
RequestDelegateGenerator\SharedTypes.cs (3)
103
[JsonSerializable(typeof(
Todo
))]
709
public record ParametersListWithExplicitFromBody(HttpContext HttpContext, [FromBody]
Todo
Todo);
987
var
todo = new Todo();