E
Size: a a a
IC
AH
VO
IC
IC
B
SmsSender
, который подключается к системе с помощью extensions:IServiceCollection AddSmsRuSender(this IServiceCollection services, Action<SmsRuOptions> configure);
SmsRuOptions
<— берутся из appsettings.json
. Я просто делаю вот так:var smsRuOptions = Configuration.Get<SmsRuOptions>("SmsRuConfig");
services.AddSmsRuSender(options => options = smsRuOptions);
microsoft
A
SmsSender
, который подключается к системе с помощью extensions:IServiceCollection AddSmsRuSender(this IServiceCollection services, Action<SmsRuOptions> configure);
SmsRuOptions
<— берутся из appsettings.json
. Я просто делаю вот так:var smsRuOptions = Configuration.Get<SmsRuOptions>("SmsRuConfig");
services.AddSmsRuSender(options => options = smsRuOptions);
microsoft
A
public static IServiceCollection Add*****(this IServiceCollection services, IConfiguration configuration) => services
.Configure<FacebookOptions>(configuration.GetSection("SocialNetworks:Facebook"))
.Configure<GoogleOptions>(configuration.GetSection("SocialNetworks:Google"))
.Configure<CookieOptions>(configuration.GetSection("Cookie"))
.AddScoped<ISessionContext, SessionContext>()
.AddSingleton<IAuthService, AuthService>();