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