Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.98 KB

README.md

File metadata and controls

53 lines (35 loc) · 1.98 KB

alt text

ESMS - Multi Sms Provider

Factory pattern structure written with .net5 for sms services

GitHub GitHub Repo stars GitHub last commit Contributors Discussions Nuget version Nuget downloads

NETGSM,SMSVITRINI,ILETIMERKEZI,MASGSM

SmsProvider Usage

PM> Install-Package ESms
services.AddSingleton<ISmsProviderFactory, SmsProviderFactory>();
PM> Injection
  private readonly ISmsProvider _smsProvider;
  public SmsController(ISmsProviderFactory SmsService)
  {
      _smsProvider = smsProvider.Create(SmsTypes.NETGSM, "Username", "Password", "TITLE");
  }
PM> Using
   public async Task SendSms(string phonenumber, string messagecontent) => await _smsProvider.SendAsync(phonenumber, messagecontent);
   
   public async Task<double> GetCredit()  => await _smsProvider.GetCreditAsync();