/// <summary>
 /// Adds Twilio to the specified <see cref="IServiceCollection"/>.
 /// </summary>
 /// <param name="buddyServices">The <see cref="IBuddyServiceCollection" /> to add services to.</param>
 /// <param name="smsConfiguration">The <see cref="ITwilioSmsConfiguration"/> instance.</param>
 /// <returns>The <see cref="IBuddyServiceCollection" /> so that additional calls can be chained.</returns>
 public static IBuddyServiceCollection AddTwilio(this IBuddyServiceCollection buddyServices,
                                                 ITwilioSmsConfiguration smsConfiguration)
 {
     buddyServices.Services.AddSingleton(smsConfiguration);
     buddyServices.Services.AddTransient <ISmser, TwilioSmser>();
     return(buddyServices);
 }
Exemplo n.º 2
0
 public TwilioSmser(ITwilioSmsConfiguration configuration, ILogger <TwilioSmser> logger)
 {
     _configuration = configuration;
     _logger        = logger;
 }