public static string Send(PushModel model) { switch (model.Channel) { case PushChannel.JPush: return(new JPushHandler(model).Send()); default: return(null); } }
public static string SendAsync(PushModel model) { switch (model.Channel) { case PushChannel.JPush: return(new JPushHandler(model).SendAsync().Result); case PushChannel.HWPush: new HuaWeiPushHandler(model).PushHuaWeiInfoAsync(); return("1"); case PushChannel.XMPush: new XiaomiPush(model).PushXiaoMi(); return("1"); default: return(null); } }
public HuaWeiPushHandler(PushModel pushModel) { model = pushModel; }
public XiaomiPush(PushModel pushModel) { model = pushModel; }
public JPushHandler(PushModel model) : base(model) { this.Source = Push.Config.Source; }