public override SMSAttribute GetConfig() { var attr = new SMSAttribute { Name = Name, TypeName = GetType().FullName, Author = "", Config = new DynamicConfig[] { } }; return attr; }
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; }
protected override void InitConfig(SMSAttribute attribute) { _username = attribute.SmsAccount; _pwd = attribute.SmsPassword; }
protected override void InitConfig(SMSAttribute attribute) { _apiKey = attribute.SmsAccount; }
protected abstract void InitConfig(SMSAttribute attribute);