-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into hishamco/issue-15805
- Loading branch information
Showing
5 changed files
with
33 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/OrchardCore/OrchardCore.Sms.Abstractions/Extensions/SmsServiceExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
namespace OrchardCore.Sms; | ||
|
||
/// <summary> | ||
/// Provides an extension methods for <see cref="ISmsService"/>. | ||
/// </summary> | ||
public static class SmsServiceExtensions | ||
{ | ||
/// <summary> | ||
/// Sends the specified message to an SMS server for delivery. | ||
/// </summary> | ||
/// <param name="smsService">The <see cref="ISmsService"/>.</param> | ||
/// <param name="to">The phone number to send the message to.</param> | ||
/// <param name="body">The body of the message to send.</param> | ||
/// <returns></returns> | ||
public static Task<SmsResult> SendAsync(this ISmsService smsService, string to, string body) | ||
{ | ||
var message = new SmsMessage | ||
{ | ||
To = to, | ||
Body = body | ||
}; | ||
|
||
return smsService.SendAsync(message); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters