/// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="appTypeEnum">App类型枚举</param>
 /// <param name="key">key</param>
 /// <param name="tag">tag</param>
 /// <param name="content">content</param>
 /// <param name="value">value</param>
 protected JPushBase(AppTypeEnum appTypeEnum, int key, IEnumerable <int> tags, string content = "", string value = "", bool isDevModel = false)
 {
     AppTypeEnum = appTypeEnum;
     Key         = key;
     Tags        = new HashSet <string>(tags.Select(t => t.ToString()));
     Content     = content;
     Value       = value;
     IsDevModel  = isDevModel;
 }
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="appTypeEnum">App类型枚举</param>
        /// <param name="key">key</param>
        /// <param name="tag">tag</param>
        /// <param name="content">content</param>
        /// <param name="value">value</param>
        protected JPushBase(AppTypeEnum appTypeEnum, int key, string tag, string content = "", string value = "", bool isDevModel = false)
        {
            Tags = new HashSet <string>();   //初始化HashSet

            AppTypeEnum = appTypeEnum;
            Key         = key;
            Tags.Add(tag);
            Content    = content;
            Value      = value;
            IsDevModel = isDevModel;
        }
		public void InitApplication(AppTypeEnum appType)
		{
			AppType = appType;
			switch (AppType)
			{
				case AppTypeEnum.FileManager:
					AppName = "app_site_admin";
					break;
				case AppTypeEnum.CloudAdmin:
					AppName = "app_cloud_admin";
					break;
				case AppTypeEnum.SalesDepot:
					AppName = "app_sales_library";
					break;
				default:
					throw new InvalidEnumArgumentException("Storage Type Undefined");
			}
		}
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="appTypeEnum">App类型枚举</param>
 /// <param name="key">key</param>
 /// <param name="tag">tag</param>
 /// <param name="content">content</param>
 /// <param name="value">value</param>
 public JPushNotification(AppTypeEnum appTypeEnum, int key, IEnumerable <int> tags, string content = "", string value = "", bool isDevModel = false)
     : base(appTypeEnum, key, tags, content, value, isDevModel)
 {
 }
 public void InitApplication(AppTypeEnum appType)
 {
     AppType         = appType;
     _localAppIdFile = new StorageFile(new[] { String.Format("{0}_app_id.xml", AppName) });
 }
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="appTypeEnum">App类型枚举</param>
 /// <param name="key">key</param>
 /// <param name="tag">tag</param>
 /// <param name="content">content</param>
 /// <param name="value">value</param>
 public JPushMessage(AppTypeEnum appTypeEnum, int key, IEnumerable <string> tags, string content = "", string value = "", bool isDevModel = false)
     : base(appTypeEnum, key, tags, content, value, isDevModel)
 {
 }
Пример #7
0
		public void InitApplication(AppTypeEnum appType)
		{
			AppType = appType;
		}