Beispiel #1
0
        public static IOSChannel GetIOSChannel(this MessageChannelEntity pChannel)
        {
            if (pChannel.MobilePlatform == 1)
            {
                throw new Exception("不能创建BaiduChannel,方法选择错误");
            }
            IOSChannel          channel    = pChannel.Settings.DeserializeJSONTo <IOSChannel>();
            ParameterDictionary dictionary = new ParameterDictionary();

            return(channel);
        }
Beispiel #2
0
        public static BaiduChannel GetBaiDuChannel(this MessageChannelEntity pChannel)
        {
            if (pChannel.MobilePlatform == 2)
            {
                throw new Exception("不能创建IOSChannel,方法选择错误");
            }
            BaiduChannel        channel    = new Message.Baidu.BaiduChannel();
            var                 settings   = pChannel.Settings.DeserializeJSONTo <Dictionary <string, object> >();
            ParameterDictionary dictionary = new ParameterDictionary();

            dictionary.InnerDictionary = settings;
            channel.Settings           = dictionary;
            channel.URL = ConfigurationManager.AppSettings["URL"];
            return(channel);
        }