Exemple #1
0
        public SmppSmsSettings GetSetting(SmsServiceType smsServiceType)
        {
            SmppSmsSettings setting = null;

            if (!this.settingsDict.TryGetValue(smsServiceType, out setting))
            {
                throw new Exception($"Invalid Setting {smsServiceType}");
            }

            return(setting);
        }
        public ISmsService GetService(string institutionCode)
        {
            SmsServiceType serviceType = SmsServiceType.AccessIPIntegrated;

            if (institutionCode == "0383833")  //TODO: International instituion
            {
                serviceType = SmsServiceType.InfoBip;
            }

            ISmsService result = null;

            if (!this.smsServiceDict.TryGetValue(serviceType, out result))
            {
                throw new NotImplementedException($"{serviceType} has not been implemented.");
            }

            return(result);
        }