Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private IAuthorizationService BuildAuthorizationService(Action<IServiceCollection> setupServices = null)
- {
- var services = new ServiceCollection();
- services.AddAuthorization();
- services.AddLogging();
- services.AddOptions();
- setupServices?.Invoke(services);
- return services.BuildServiceProvider().GetRequiredService<IAuthorizationService>();
- }
Add Comment
Please, Sign In to add comment