From b72b9f2eb3a1428d40e06b6112be6b9d626bb14d Mon Sep 17 00:00:00 2001 From: MiriamKyoseva Date: Wed, 26 Jun 2024 22:59:43 +0300 Subject: [PATCH 1/2] Bellatrix.SMS Initial Commit --- BellatrixTestFramework.sln | 35 +++++++++++ src/Bellatrix.SMS/Bellatrix.SMS.csproj | 17 ++++++ src/Bellatrix.SMS/SmsEventArgs.cs | 29 +++++++++ src/Bellatrix.SMS/SmsListener.cs | 82 ++++++++++++++++++++++++++ src/Bellatrix.SMS/SmsService.cs | 44 ++++++++++++++ src/Bellatrix.SMS/TwilioSettings.cs | 22 +++++++ 6 files changed, 229 insertions(+) create mode 100644 src/Bellatrix.SMS/Bellatrix.SMS.csproj create mode 100644 src/Bellatrix.SMS/SmsEventArgs.cs create mode 100644 src/Bellatrix.SMS/SmsListener.cs create mode 100644 src/Bellatrix.SMS/SmsService.cs create mode 100644 src/Bellatrix.SMS/TwilioSettings.cs diff --git a/BellatrixTestFramework.sln b/BellatrixTestFramework.sln index c33e291f..0c7da573 100644 --- a/BellatrixTestFramework.sln +++ b/BellatrixTestFramework.sln @@ -90,6 +90,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bellatrix.Playwright", "src EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bellatrix.Playwright.GettingStarted", "templates\Bellatrix.Playwright.GettingStarted\Bellatrix.Playwright.GettingStarted.csproj", "{EACDDFC5-A313-4981-9FFB-F41639713BB1}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bellatrix.SMS", "Bellatrix.SMS\Bellatrix.SMS.csproj", "{B547B829-8E75-49F3-A046-097B24317F6C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution DEBUG|Any CPU = DEBUG|Any CPU @@ -1166,6 +1168,38 @@ Global {EACDDFC5-A313-4981-9FFB-F41639713BB1}.STAGE|x64.Build.0 = Debug|Any CPU {EACDDFC5-A313-4981-9FFB-F41639713BB1}.STAGE|x86.ActiveCfg = Debug|Any CPU {EACDDFC5-A313-4981-9FFB-F41639713BB1}.STAGE|x86.Build.0 = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.DEBUG|ARM.Build.0 = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.DEBUG|x64.Build.0 = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.DEBUG|x86.Build.0 = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.QA|Any CPU.Build.0 = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.QA|ARM.ActiveCfg = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.QA|ARM.Build.0 = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.QA|x64.ActiveCfg = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.QA|x64.Build.0 = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.QA|x86.ActiveCfg = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.QA|x86.Build.0 = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.Release|Any CPU.Build.0 = Release|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.Release|ARM.ActiveCfg = Release|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.Release|ARM.Build.0 = Release|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.Release|x64.ActiveCfg = Release|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.Release|x64.Build.0 = Release|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.Release|x86.ActiveCfg = Release|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.Release|x86.Build.0 = Release|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.STAGE|ARM.Build.0 = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.STAGE|x64.ActiveCfg = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.STAGE|x64.Build.0 = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.STAGE|x86.ActiveCfg = Debug|Any CPU + {B547B829-8E75-49F3-A046-097B24317F6C}.STAGE|x86.Build.0 = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1205,6 +1239,7 @@ Global {1AFF3507-F2C7-4240-A9D4-B166BEAC9B6F} = {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} {08D46A7C-4BCC-4813-B20F-C7A9039621C9} = {1DF0F472-E4CA-4EFD-9459-F5B90E2E8E67} {EACDDFC5-A313-4981-9FFB-F41639713BB1} = {74747D87-4B09-479B-B2FC-63F2CCAC4201} + {B547B829-8E75-49F3-A046-097B24317F6C} = {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5CA92FF2-B2AC-41BA-ADDD-1F259867B5F4} diff --git a/src/Bellatrix.SMS/Bellatrix.SMS.csproj b/src/Bellatrix.SMS/Bellatrix.SMS.csproj new file mode 100644 index 00000000..5f5916fb --- /dev/null +++ b/src/Bellatrix.SMS/Bellatrix.SMS.csproj @@ -0,0 +1,17 @@ + + + + net8.0 + enable + enable + + + + + + + + + + + diff --git a/src/Bellatrix.SMS/SmsEventArgs.cs b/src/Bellatrix.SMS/SmsEventArgs.cs new file mode 100644 index 00000000..58c0b0c4 --- /dev/null +++ b/src/Bellatrix.SMS/SmsEventArgs.cs @@ -0,0 +1,29 @@ +// +// Copyright 2024 Automate The Planet Ltd. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Miriam Kyoseva +// https://bellatrix.solutions/ + +using Twilio.Rest.Api.V2010.Account; + +namespace Bellatrix.SMS; + +public class SmsEventArgs : EventArgs +{ + public SmsListener SmsListener { get; } + public MessageResource Message { get; } + + public SmsEventArgs(SmsListener smsListener, MessageResource message) + { + SmsListener = smsListener; + Message = message; + } +} \ No newline at end of file diff --git a/src/Bellatrix.SMS/SmsListener.cs b/src/Bellatrix.SMS/SmsListener.cs new file mode 100644 index 00000000..ac062749 --- /dev/null +++ b/src/Bellatrix.SMS/SmsListener.cs @@ -0,0 +1,82 @@ +// +// Copyright 2024 Automate The Planet Ltd. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Miriam Kyoseva +// https://bellatrix.solutions/ + +using Twilio.Rest.Api.V2010.Account; + +namespace Bellatrix.SMS; + +public class SmsListener +{ + public static event EventHandler MessageReceived; + + private readonly string phoneNumber; + private readonly List messages = new List(); + private CancellationTokenSource cancellationTokenSource; + private DateTime start; + + public SmsListener(string phoneNumber = null) + { + this.phoneNumber = phoneNumber; + } + + public List GetMessages() + { + return new List(messages); + } + + public MessageResource GetLastMessage() + { + return messages.LastOrDefault(); + } + + public void Listen() + { + start = DateTime.UtcNow; + cancellationTokenSource = new CancellationTokenSource(); + Task.Run(() => CheckForMessages(cancellationTokenSource.Token)); + } + + public void StopListening() + { + if (cancellationTokenSource != null) + { + cancellationTokenSource.Cancel(); + cancellationTokenSource.Dispose(); + } + } + + private async Task CheckForMessages(CancellationToken cancellationToken) + { + while (!cancellationToken.IsCancellationRequested) + { + var messageReader = MessageResource.ReadAsync( + dateSentAfter: start, + from: phoneNumber, + limit: 1 + ); + + var foundMessages = await messageReader; + + if (foundMessages.Any()) + { + var message = foundMessages.First(); + messages.Add(message); + MessageReceived?.Invoke(this, new SmsEventArgs(this, message)); + start = DateTime.UtcNow; + } + + await Task.Delay(TimeSpan.FromMilliseconds(500), cancellationToken); + } + } +} diff --git a/src/Bellatrix.SMS/SmsService.cs b/src/Bellatrix.SMS/SmsService.cs new file mode 100644 index 00000000..ed0803b7 --- /dev/null +++ b/src/Bellatrix.SMS/SmsService.cs @@ -0,0 +1,44 @@ +using Twilio; +using Twilio.Rest.Api.V2010.Account; + +namespace Bellatrix.SMS; + +public class SmsService +{ + private static readonly TwilioSettings settings; + + static SmsService() + { + settings = ConfigurationService.GetSection(); + TwilioClient.Init(settings.Username, settings.AuthToken, settings.AccountSID); + } + + public static SmsListener ListenForSms(string fromNumber) + { + var smsListener = new SmsListener(fromNumber); + smsListener.Listen(); + return smsListener; + } + + public static SmsListener ListenForSms() + { + var smsListener = new SmsListener(); + smsListener.Listen(); + return smsListener; + } + + public static void StopListeningForSms(SmsListener smsListener) + { + smsListener.StopListening(); + } + + public static List GetMessages(SmsListener smsListener) + { + return smsListener.GetMessages(); + } + + public static MessageResource GetLastMessage(SmsListener smsListener) + { + return smsListener.GetLastMessage(); + } +} \ No newline at end of file diff --git a/src/Bellatrix.SMS/TwilioSettings.cs b/src/Bellatrix.SMS/TwilioSettings.cs new file mode 100644 index 00000000..b7f61aaf --- /dev/null +++ b/src/Bellatrix.SMS/TwilioSettings.cs @@ -0,0 +1,22 @@ +// +// Copyright 2024 Automate The Planet Ltd. +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Miriam Kyoseva +// https://bellatrix.solutions/ + +namespace Bellatrix.SMS; + +public class TwilioSettings +{ + public string? AccountSID { get; set; } + public string? AuthToken { get; set; } + public string? PhoneNumber { get; set; } +} From 0d60e98d9fd98a1d68390f961e678459eebf1995 Mon Sep 17 00:00:00 2001 From: MiriamKyoseva Date: Tue, 9 Jul 2024 10:48:37 +0300 Subject: [PATCH 2/2] fixes to Bellatrix.SMS --- BellatrixTestFramework.sln | 68 +++++++++---------- .../Bellatrix.KeyVault.csproj | 2 +- src/Bellatrix.SMS/Bellatrix.SMS.csproj | 2 +- src/Bellatrix.SMS/SmsService.cs | 2 +- 4 files changed, 37 insertions(+), 37 deletions(-) diff --git a/BellatrixTestFramework.sln b/BellatrixTestFramework.sln index 0c7da573..d4b7818d 100644 --- a/BellatrixTestFramework.sln +++ b/BellatrixTestFramework.sln @@ -90,7 +90,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bellatrix.Playwright", "src EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bellatrix.Playwright.GettingStarted", "templates\Bellatrix.Playwright.GettingStarted\Bellatrix.Playwright.GettingStarted.csproj", "{EACDDFC5-A313-4981-9FFB-F41639713BB1}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bellatrix.SMS", "Bellatrix.SMS\Bellatrix.SMS.csproj", "{B547B829-8E75-49F3-A046-097B24317F6C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bellatrix.SMS", "src\Bellatrix.SMS\Bellatrix.SMS.csproj", "{2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -1168,38 +1168,38 @@ Global {EACDDFC5-A313-4981-9FFB-F41639713BB1}.STAGE|x64.Build.0 = Debug|Any CPU {EACDDFC5-A313-4981-9FFB-F41639713BB1}.STAGE|x86.ActiveCfg = Debug|Any CPU {EACDDFC5-A313-4981-9FFB-F41639713BB1}.STAGE|x86.Build.0 = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.DEBUG|Any CPU.Build.0 = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.DEBUG|ARM.ActiveCfg = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.DEBUG|ARM.Build.0 = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.DEBUG|x64.ActiveCfg = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.DEBUG|x64.Build.0 = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.DEBUG|x86.ActiveCfg = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.DEBUG|x86.Build.0 = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.QA|Any CPU.ActiveCfg = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.QA|Any CPU.Build.0 = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.QA|ARM.ActiveCfg = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.QA|ARM.Build.0 = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.QA|x64.ActiveCfg = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.QA|x64.Build.0 = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.QA|x86.ActiveCfg = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.QA|x86.Build.0 = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.Release|Any CPU.Build.0 = Release|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.Release|ARM.ActiveCfg = Release|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.Release|ARM.Build.0 = Release|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.Release|x64.ActiveCfg = Release|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.Release|x64.Build.0 = Release|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.Release|x86.ActiveCfg = Release|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.Release|x86.Build.0 = Release|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.STAGE|Any CPU.Build.0 = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.STAGE|ARM.ActiveCfg = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.STAGE|ARM.Build.0 = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.STAGE|x64.ActiveCfg = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.STAGE|x64.Build.0 = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.STAGE|x86.ActiveCfg = Debug|Any CPU - {B547B829-8E75-49F3-A046-097B24317F6C}.STAGE|x86.Build.0 = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.DEBUG|Any CPU.Build.0 = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.DEBUG|ARM.ActiveCfg = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.DEBUG|ARM.Build.0 = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.DEBUG|x64.ActiveCfg = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.DEBUG|x64.Build.0 = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.DEBUG|x86.ActiveCfg = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.DEBUG|x86.Build.0 = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.QA|Any CPU.ActiveCfg = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.QA|Any CPU.Build.0 = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.QA|ARM.ActiveCfg = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.QA|ARM.Build.0 = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.QA|x64.ActiveCfg = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.QA|x64.Build.0 = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.QA|x86.ActiveCfg = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.QA|x86.Build.0 = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.Release|Any CPU.Build.0 = Release|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.Release|ARM.ActiveCfg = Release|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.Release|ARM.Build.0 = Release|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.Release|x64.ActiveCfg = Release|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.Release|x64.Build.0 = Release|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.Release|x86.ActiveCfg = Release|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.Release|x86.Build.0 = Release|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.STAGE|Any CPU.ActiveCfg = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.STAGE|Any CPU.Build.0 = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.STAGE|ARM.ActiveCfg = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.STAGE|ARM.Build.0 = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.STAGE|x64.ActiveCfg = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.STAGE|x64.Build.0 = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.STAGE|x86.ActiveCfg = Debug|Any CPU + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C}.STAGE|x86.Build.0 = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1239,7 +1239,7 @@ Global {1AFF3507-F2C7-4240-A9D4-B166BEAC9B6F} = {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} {08D46A7C-4BCC-4813-B20F-C7A9039621C9} = {1DF0F472-E4CA-4EFD-9459-F5B90E2E8E67} {EACDDFC5-A313-4981-9FFB-F41639713BB1} = {74747D87-4B09-479B-B2FC-63F2CCAC4201} - {B547B829-8E75-49F3-A046-097B24317F6C} = {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} + {2E7AA3E4-36F3-4C11-9C3F-C767DF29814C} = {E8AA67CB-09C6-4E4B-AFF1-0D5875903C34} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5CA92FF2-B2AC-41BA-ADDD-1F259867B5F4} diff --git a/src/Bellatrix.KeyVault/Bellatrix.KeyVault.csproj b/src/Bellatrix.KeyVault/Bellatrix.KeyVault.csproj index 178f9e28..66b684f7 100644 --- a/src/Bellatrix.KeyVault/Bellatrix.KeyVault.csproj +++ b/src/Bellatrix.KeyVault/Bellatrix.KeyVault.csproj @@ -1,7 +1,7 @@  - + diff --git a/src/Bellatrix.SMS/Bellatrix.SMS.csproj b/src/Bellatrix.SMS/Bellatrix.SMS.csproj index 5f5916fb..89fe5556 100644 --- a/src/Bellatrix.SMS/Bellatrix.SMS.csproj +++ b/src/Bellatrix.SMS/Bellatrix.SMS.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/Bellatrix.SMS/SmsService.cs b/src/Bellatrix.SMS/SmsService.cs index ed0803b7..3744cf83 100644 --- a/src/Bellatrix.SMS/SmsService.cs +++ b/src/Bellatrix.SMS/SmsService.cs @@ -10,7 +10,7 @@ public class SmsService static SmsService() { settings = ConfigurationService.GetSection(); - TwilioClient.Init(settings.Username, settings.AuthToken, settings.AccountSID); + TwilioClient.Init(settings.AccountSID, settings.AuthToken); } public static SmsListener ListenForSms(string fromNumber)