Example #1
0
        public static string Send(PushModel model)
        {
            switch (model.Channel)
            {
            case PushChannel.JPush:
                return(new JPushHandler(model).Send());

            default:
                return(null);
            }
        }
Example #2
0
        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);
            }
        }
Example #3
0
 public HuaWeiPushHandler(PushModel pushModel)
 {
     model = pushModel;
 }
Example #4
0
 public XiaomiPush(PushModel pushModel)
 {
     model = pushModel;
 }
Example #5
0
 public JPushHandler(PushModel model) : base(model)
 {
     this.Source = Push.Config.Source;
 }