private string GetChatTitle()
        {
            IEnumerable <string> usernames = participationRepository.GetParticipationsByConversationId(groupChat.Conversation.Id)
                                             .Select(participant => userRepository.FindEntityById(participant.UserId).Username);

            return(ChatWindowStringBuilder.CreateUserListTitle(usernames.ToList()));
        }
Esempio n. 2
0
        private string GetConversationParticipants()
        {
            var usernames = new List <string>();

            var titleBuilder = new StringBuilder();

            foreach (Participation participant in participationRepository.GetParticipationsByConversationId(conversation.Id))
            {
                usernames.Add(userRepository.FindEntityById(participant.UserId).Username);
            }

            titleBuilder.Append(ChatWindowStringBuilder.CreateUserListTitle(usernames));

            return(titleBuilder.ToString());
        }