예제 #1
0
 public override SMSAttribute GetConfig()
 {
     var attr = new SMSAttribute {
                                     Name = Name, TypeName = GetType().FullName, Author = "", Config = new DynamicConfig[] {
                                                                                                                              }
                                 };
     return attr;
 }
예제 #2
0
파일: SMSSender.cs 프로젝트: gowhy/LoveBank
        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;
        }
예제 #3
0
 protected override void InitConfig(SMSAttribute attribute)
 {
     _username = attribute.SmsAccount;
     _pwd = attribute.SmsPassword;
 }
예제 #4
0
 protected override void InitConfig(SMSAttribute attribute)
 {
     _apiKey = attribute.SmsAccount;
 }
예제 #5
0
파일: SMSSender.cs 프로젝트: gowhy/LoveBank
 protected abstract void InitConfig(SMSAttribute attribute);