38 references to CreateServiceProvider
Microsoft.AspNetCore.Http.Extensions.Tests (38)
RequestDelegateGenerator\CompileTimeCreationTests.cs (1)
424var serviceProvider = CreateServiceProvider(serviceCollection =>
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (2)
164var builder = new DefaultEndpointRouteBuilder(new ApplicationBuilder(serviceProvider ?? CreateServiceProvider())); 200httpContext.RequestServices = serviceProvider ?? CreateServiceProvider();
RequestDelegateGenerator\RequestDelegateCreationTests.cs (1)
613var serviceProvider = CreateServiceProvider((serviceCollection) => serviceCollection.AddSingleton<global::Http.ExampleService>());
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (4)
319var endpoint = GetEndpointFromCompilation(compilation, serviceProvider: CreateServiceProvider()); 921var serviceProvider = CreateServiceProvider(serviceCollection => 958var serviceProvider = CreateServiceProvider(); 992var serviceProvider = CreateServiceProvider(serviceCollection =>
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBodyOrService.cs (4)
48var serviceProvider = CreateServiceProvider(hasService ? 78var serviceProvider = CreateServiceProvider((serviceCollection) => serviceCollection.AddSingleton(new TestService())); 119var serviceProvider = CreateServiceProvider(); 191var serviceProvider = CreateServiceProvider(serviceCollection =>
RequestDelegateGenerator\RequestDelegateCreationTests.KeyServices.cs (8)
22var serviceProvider = CreateServiceProvider((serviceCollection) => serviceCollection.AddKeyedSingleton("service1", myOriginalService)); 38var serviceProvider = CreateServiceProvider((serviceCollection) => serviceCollection.AddKeyedSingleton("service1", myOriginalService)); 64var serviceProvider = CreateServiceProvider((serviceCollection) => 88var serviceProvider = CreateServiceProvider((serviceCollection) => serviceCollection.AddKeyedSingleton('a', myOriginalService)); 108var serviceProvider = CreateServiceProvider((serviceCollection) => serviceCollection.AddKeyedSingleton(key, myOriginalService)); 161var serviceProvider = CreateServiceProvider((serviceCollection) => 189var serviceProvider = CreateServiceProvider((serviceCollection) => 239var serviceProvider = CreateServiceProvider((serviceCollection) => serviceCollection.AddKeyedSingleton<global::Http.ExampleService>("example"));
RequestDelegateGenerator\RequestDelegateCreationTests.Logging.cs (15)
32var serviceProvider = CreateServiceProvider(); 94var serviceProvider = CreateServiceProvider(); 142var serviceProvider = CreateServiceProvider(serviceCollection => 179var serviceProvider = CreateServiceProvider(serviceCollection => 216var serviceProvider = CreateServiceProvider(); 260var serviceProvider = CreateServiceProvider(serviceCollection => 296var serviceProvider = CreateServiceProvider(); 340var serviceProvider = CreateServiceProvider(serviceCollection => 377var serviceProvider = CreateServiceProvider(serviceCollection => 423var serviceProvider = CreateServiceProvider(serviceCollection => 472var serviceProvider = CreateServiceProvider(serviceCollection => 509var serviceProvider = CreateServiceProvider(serviceCollection => 550var serviceProvider = CreateServiceProvider(serviceCollection => 590var serviceProvider = CreateServiceProvider(serviceCollection => 630var serviceProvider = CreateServiceProvider(serviceCollection =>
RequestDelegateGenerator\RequestDelegateCreationTests.Metadata.cs (2)
358var serviceProvider = CreateServiceProvider((services) => 378var serviceProvider = CreateServiceProvider((services) =>
RequestDelegateGenerator\RequestDelegateCreationTests.QueryParameters.cs (1)
45var serviceProvider = CreateServiceProvider();