Skip to content

ESMS - Multi Sms Provider for .Net Standard & .Net Framework

License

Notifications You must be signed in to change notification settings

enisgurkann/ESMS

Repository files navigation

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();