public ApiResult SystemMessageService() { var result = new ApiResult(); var items = typeof(MessageCategory).GetItems(); var categoryList = new List <SystemMessageCategory>(); foreach (var item in items) { var category = new SystemMessageCategory(); category.Category = (MessageCategory)((int)item.Value); category.Name = category.Category.Description(); int unreadCount; category.FirstMessage = _systemMessageService.GetFirstMessage(category.Category, AuthorizedUser.Id, out unreadCount); category.UnreadCount = unreadCount; categoryList.Add(category); } result.SetData(categoryList); return(result); }
public SystemMessage(SystemMessageCategory category, string msg, params object[] parameters) { this.Message = new HeroesString(msg, parameters); this.Category = (byte)category; }
public SystemMessage(SystemMessageCategory category, string msg) { this.Message = new HeroesString(msg); this.Category = (byte)category; }
public SystemMessage(SystemMessageCategory category, HeroesString msg) { this.Message = msg; this.Category = (byte)category; }