コード例 #1
0
        public async Task <bool> SendSMS(string nr)
        {
            logger.Write($"Sending SMS to {nr}");
            var result = await notificationServiceV2.SendSMS(nr);

            logger.Write($"SMS to {nr} sent with result {result}");
            return(result);
        }
コード例 #2
0
        public async Task <bool> SendSMS(string nr)
        {
            var result = cache.Get <string>("phoneNr");

            if (result != null && result == nr)
            {
                return(true);
            }
            var sendResult = await notificationServiceV2.SendSMS(nr);

            cache.Add("phoneNr", nr);
            return(sendResult);
        }
コード例 #3
0
        public async Task <ActionResult <bool> > SendSMS(string @nr)
        {
            var result = await notificationService.SendSMS(@nr);

            return(Ok(result));
        }