コード例 #1
0
        protected static ServiceProvider ConfigureAppServices(Action <ServiceCollection> configure = null)
        {
            var services = new ServiceCollection();

            WebApplication.ConfigureAppServices(services);
            configure?.Invoke(services);

            var scope = services.BuildServiceProvider();

            return(scope);
        }