/// <summary>
 /// Инициализация SMS-клиента
 /// </summary>
 /// <param name="props">Свойства</param>
 /// <param name="device">Интерфейс SMS-клиента</param>
 void InitSMSClient(SMSClientProperties props, ISMSClient device)
 {
     foreach (KeyValuePair <string, string> kvp in props.Settings)
     {
         device.SetConnectivityParam(kvp.Key, kvp.Value);
     }
 }
Exemple #2
0
 public NotificationManager(ILogger <NotificationManager> logger,
                            ISMSClient twilioClientWrapper,
                            IEmailClient emailClient)
 {
     this.logger = logger;
     this.twilioClientWrapper = twilioClientWrapper;
     this.emailClient         = emailClient;
 }
Exemple #3
0
        public SMSClientTests()
        {
            var smsUser     = builder["SMSUser"];
            var smsPassword = builder["SMSPassword"];

            client = new SMSClient(new HttpClient(), smsUser, smsPassword, AddressRegion.CN);
            client.AddTemplate(new TemplateItem(TemplateKind.Code, "762226", Region: "CN", Default: true));
            client.AddTemplate(new TemplateItem(TemplateKind.Code, "762227", Default: true));
        }
 public RegistrationsController(IRegistrationRepository repository, ISMSClient smsClient)
 {
     _repository = repository;
     _smsClient  = smsClient;
 }
Exemple #5
0
 public Send(ISMSClient sms, ICosmosRead recipientsCosmosService, ICosmosCRUD cocktailCacheCosmosService, CocktailDBHttpClient httpClient)
 => (_SMS, _RecipientsCosmosService, _CocktailCacheCosmosService, _HttpClient) = (sms, recipientsCosmosService, cocktailCacheCosmosService, httpClient);
Exemple #6
0
 public ContactValidator(ILogger <ContactValidator> logger, ISMSClient twilioClient)
 {
     this.logger       = logger;
     this.twilioClient = twilioClient;
 }