private GroupDetails GetGroupDetails(Card card, CardMember cardMember)
        {
            List <string> key   = new List <string>();
            List <string> title = new List <string>();

            if (GroupByMember)
            {
                key.Add(cardMember != null ? cardMember.FullName : "Unassigned");
                title.Add(cardMember != null ? cardMember.FullName : "Unassigned");
            }
            if (GroupByPriority)
            {
                Priority priority = TrelloUtility.GetPriority(card);
                key.Add(((int)priority).ToString());
                title.Add(priority.ToString());
            }
            if (GroupByList)
            {
                key.Add(string.Format("{0:#.###}", TrelloUtility.GetListPosition(card, m_lists)).PadLeft(10, '0'));
                title.Add(TrelloUtility.GetListName(card, m_lists));
            }
            return(new GroupDetails
            {
                Key = string.Join("|", key),
                Title = string.Join(" | ", title)
            });
        }
        private CardViewModel Map(Card card, CardMember member)
        {
            GroupDetails groupDetails = GetGroupDetails(card, member);
            string       assignedTo   = TrelloUtility.GetAssignedTo(card, m_members);

            return(new CardViewModel(
                       groupKey: groupDetails.Key,
                       groupTitle: groupDetails.Title,
                       title: card.Name,
                       description: card.Description,
                       list: TrelloUtility.GetListName(card, m_lists),
                       assignedTo: assignedTo,
                       assignedToMe: assignedTo != null && m_trelloFullName != null && assignedTo.Contains(m_trelloFullName),
                       url: card.ShortUrl,
                       creationDate: TrelloUtility.GetDateCreated(card),
                       priority: TrelloUtility.GetPriority(card)));
        }
 private bool FilterMember(CardMember member)
 {
     return(m_memberFilters.All(x => !x.IsSelected) ||
            m_memberFilters.Any(x => x.IsSelected && (x.FilterId != "" ? member != null && member.Id == x.FilterId : member == null)));
 }