Основные методы
Основные методы
Основные методы
Основные методы
public static IAuthorizationService BuildAuthorizationService(Action <IServiceCollection> setupServices = null) { var services = new Microsoft.Extensions.DependencyInjection.ServiceCollection(); services.AddAuthorization(); services.AddOptions(); services.AddLogging(); setupServices?.Invoke(services); return(services.BuildServiceProvider().GetRequiredService <IAuthorizationService>()); }