4 types derived from Todo
Microsoft.AspNetCore.Http.Extensions.Tests (4)
RequestDelegateGenerator\SharedTypes.cs (4)
63public class TryParseTodo : Todo 87public class JsonTodo : Todo 200public class CustomTodo : Todo 1024public class TodoChild : Todo
10 instantiations of Todo
Microsoft.AspNetCore.Http.Extensions.Tests (10)
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();
31 references to Todo
Microsoft.AspNetCore.Http.Extensions.Tests (31)
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();