예제 #1
0
 /// <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);
     }
 }
예제 #2
0
 public NotificationManager(ILogger <NotificationManager> logger,
                            ISMSClient twilioClientWrapper,
                            IEmailClient emailClient)
 {
     this.logger = logger;
     this.twilioClientWrapper = twilioClientWrapper;
     this.emailClient         = emailClient;
 }
예제 #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;
 }
예제 #5
0
파일: Send.cs 프로젝트: cayala/CocktailTime
 public Send(ISMSClient sms, ICosmosRead recipientsCosmosService, ICosmosCRUD cocktailCacheCosmosService, CocktailDBHttpClient httpClient)
 => (_SMS, _RecipientsCosmosService, _CocktailCacheCosmosService, _HttpClient) = (sms, recipientsCosmosService, cocktailCacheCosmosService, httpClient);
예제 #6
0
 public ContactValidator(ILogger <ContactValidator> logger, ISMSClient twilioClient)
 {
     this.logger       = logger;
     this.twilioClient = twilioClient;
 }