Example #1
0
 public override SMSAttribute GetConfig()
 {
     var attr = new SMSAttribute {
                                     Name = Name, TypeName = GetType().FullName, Author = "", Config = new DynamicConfig[] {
                                                                                                                              }
                                 };
     return attr;
 }
Example #2
0
        public static SMSSender CreateInstance(SMSAttribute configAttr)
        {
            if (configAttr==null)
            {
                return null;
            }
            var plugin = SMSPlugins.Instance().GetPlugin(configAttr.TypeName);
            if (plugin == null)
            {
                return null;
            }

            var sender = Activator.CreateInstance(plugin) as SMSSender;

            if ((sender != null))
            {
                sender.InitConfig(configAttr);
            }
            return sender;
        }
Example #3
0
 protected override void InitConfig(SMSAttribute attribute)
 {
     _username = attribute.SmsAccount;
     _pwd = attribute.SmsPassword;
 }
Example #4
0
 protected override void InitConfig(SMSAttribute attribute)
 {
     _apiKey = attribute.SmsAccount;
 }
Example #5
0
 protected abstract void InitConfig(SMSAttribute attribute);