Esempio n. 1
0
        public void SendTestSmsWithTwoAttachments()
        {
            IStorageService storageService = new AzureStorageBlobService(_storageConfig);
            TwilioService   twilioService  = new TwilioService(_twilioConfig, storageService);

            var messageSid = twilioService.Send("SendTestSmsWithTwoAttachments test SMS", "+11234567890", _images);

            Assert.IsTrue(!string.IsNullOrEmpty(messageSid));
        }
Esempio n. 2
0
        public void SendTestSmsWithOneAttachment()
        {
            IStorageService storageService = new AzureStorageBlobService(_storageConfig);
            TwilioService   twilioService  = new TwilioService(_twilioConfig, storageService);

            var attachment = new Dictionary <string, string>()
            {
                { _images.FirstOrDefault().Key, _images.FirstOrDefault().Value }
            };

            var messageSid = twilioService.Send("SendTestSmsWithNotAttachments test SMS", "+11234567890", attachment);

            Assert.IsTrue(!string.IsNullOrEmpty(messageSid));
        }
Esempio n. 3
0
        private void OnSendSmsClicked(object sender, EventArgs e)
        {
            string phoneNumber = PhoneNumber.Text;
            string customText  = SmsCustomText.Text;

            Dictionary <string, string> images = new Dictionary <string, string>()
            {
                { "TestImage1.png", @"..\Appx\Assets\Square44x44Logo.scale-200.png" }
            };

            IStorageService storageService = new AzureStorageBlobService(GetStorageConfig());
            TwilioService   twilioService  = new TwilioService(GetTwilioConfig(), storageService);

            var messageSid = twilioService.Send(customText, phoneNumber, images);

            DisplayAlert("Message Result", messageSid, "OK");
        }