Пример #1
0
        /// <summary>
        /// 创建单播的消息(消息类型=通知)推送请求
        /// </summary>
        /// <param name="pBaiduUserID"></param>
        /// <param name="pBaiduChannelID"></param>
        /// <param name="pMessageTitle"></param>
        /// <param name="pMessageDescription"></param>
        /// <returns></returns>
        public static PushMsgRequest CreateUnicastNotificationRequest(string pBaiduUserID
                                                                      , string pBaiduChannelID
                                                                      , string pMessageTitle
                                                                      , string pMessageDescription
                                                                      , PushTypes pushType = PushTypes.Unicast)
        {
            BaiduPushNotification msg = new BaiduPushNotification();

            msg.Title                  = pMessageTitle;
            msg.Description            = pMessageDescription;
            msg.OpenType               = 2;
            msg.NotificationBuilderID  = 0;
            msg.NotificationBasicStyle = 4;
            return(PushMsgRequestBuilder.CreateUnicastNotificationRequest(pBaiduUserID, pBaiduChannelID, null, msg, null, pushType));
        }
Пример #2
0
 /// <summary>
 /// 创建单播的消息(消息类型=通知)推送请求
 /// </summary>
 /// <param name="pBaiduUserID"></param>
 /// <param name="pBaiduChannelID"></param>
 /// <param name="pMessage"></param>
 /// <returns></returns>
 public static PushMsgRequest CreateUnicastNotificationRequest(string pBaiduUserID
                                                               , string pBaiduChannelID
                                                               , BaiduPushNotification pMessage)
 {
     return(PushMsgRequestBuilder.CreateUnicastNotificationRequest(pBaiduUserID, pBaiduChannelID, null, pMessage, null));
 }