14 instantiations of TestService
Microsoft.AspNetCore.Http.Extensions.Tests (14)
RequestDelegateGenerator\RequestDelegateCreationTests.cs (2)
271serviceCollection.AddSingleton<TestService>(new TestService()); 300serviceCollection.AddSingleton<TestService>(new TestService());
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBodyOrService.cs (3)
49(serviceCollection) => serviceCollection.AddSingleton(new TestService()) 78var serviceProvider = CreateServiceProvider((serviceCollection) => serviceCollection.AddSingleton(new TestService())); 217serviceCollection.AddSingleton(new TestService());
RequestDelegateGenerator\RequestDelegateCreationTests.KeyServices.cs (9)
21var myOriginalService = new TestService(); 37var myOriginalService = new TestService(); 62var myOriginalService1 = new TestService(); 63var myOriginalService2 = new TestService(); 87var myOriginalService = new TestService(); 107var myOriginalService = new TestService(); 160var myOriginalService1 = new TestService(); 187var myOriginalService1 = new TestService(); 188var myOriginalService2 = new TestService();
17 references to TestService
Microsoft.AspNetCore.Http.Extensions.Tests (17)
RequestDelegateGenerator\RequestDelegateCreationTests.cs (2)
271serviceCollection.AddSingleton<TestService>(new TestService()); 300serviceCollection.AddSingleton<TestService>(new TestService());
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBodyOrService.cs (1)
27var implicitRequiredServiceSource = $"""app.MapPost("/", ({typeof(TestService)} svc) => svc.TestServiceMethod());""";
RequestDelegateGenerator\RequestDelegateCreationTests.KeyServices.cs (13)
21var myOriginalService = new TestService(); 37var myOriginalService = new TestService(); 62var myOriginalService1 = new TestService(); 63var myOriginalService2 = new TestService(); 87var myOriginalService = new TestService(); 107var myOriginalService = new TestService(); 160var myOriginalService1 = new TestService(); 164serviceCollection.AddKeyedScoped<TestService>("service2"); 172Assert.IsType<TestService>(httpContext.Items["arg2"]); 187var myOriginalService1 = new TestService(); 188var myOriginalService2 = new TestService(); 192serviceCollection.AddKeyedScoped<TestService>("service2"); 201Assert.IsType<TestService>(httpContext.Items["arg2"]);
RequestDelegateGenerator\SharedTypes.cs (1)
719public record struct ParameterRecordStructWithJsonBodyOrService(TodoStruct Todo, TestService Service);