public T GetIdentityService()

in src/Tools/Administrative.Cli/DependencyInjection/IdentityServicesAccessor.cs [48:70]


        public T GetIdentityService<T>()
            => GetIdentityService<T>(false);

        public T GetIdentityService<T>(bool verbose)
        {
            var services = new ServiceCollection();

            services.AddLogging(builder =>
            {
                if (verbose)
                {
                    builder.AddFilter("Microsoft", LogLevel.Information);
                    builder.AddConsole();
                }
            });
            services.AddIdentityWithStore(configuration);
            services.AddScoped<ConsoleUserManager<ApplicationUser>>();

            serviceProvider = services.BuildServiceProvider();
            scope = serviceProvider.GetRequiredService<IServiceScopeFactory>().CreateScope();

            return scope.ServiceProvider.GetRequiredService<T>();
        }