コード例 #1
0
ファイル: SmsController.cs プロジェクト: pquic/qCommerce
 public SmsController(ISmsService smsService, SmsSettings smsSettings,
     ISettingService settingService, IPermissionService permissionService)
 {
     this._smsService = smsService;
     this._smsSettings = smsSettings;
     this._settingService = settingService;
     this._permissionService = permissionService;
 }
コード例 #2
0
ファイル: SmsExtentions.cs プロジェクト: pquic/qCommerce
        public static bool IsSmsProviderActive(this ISmsProvider smsProvider,
            SmsSettings smsSettings)
        {
            if (smsProvider == null)
                throw new ArgumentNullException("smsProvider");

            if (smsSettings == null)
                throw new ArgumentNullException("smsSettings");

            if (smsSettings.ActiveSmsProviderSystemNames == null)
                return false;
            foreach (string activeMethodSystemName in smsSettings.ActiveSmsProviderSystemNames)
                if (smsProvider.PluginDescriptor.SystemName.Equals(activeMethodSystemName, StringComparison.InvariantCultureIgnoreCase))
                    return true;
            return false;
        }
コード例 #3
0
ファイル: SMSService.cs プロジェクト: pquic/qCommerce
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="pluginFinder">Plugin finder</param>
 /// <param name="smsSettings">SmsSettings instance</param>
 public SmsService(IPluginFinder pluginFinder, SmsSettings smsSettings)
 {
     this._pluginFinder = pluginFinder;
     this._smsSettings = smsSettings;
 }