Exemplo n.º 1
0
        public IEnumerable <ChatLookUC> GetSoloChatUC(string token)
        {
            List <ChatLookUC>     soloChatUCs = new List <ChatLookUC>();
            IService              service     = new WCFService();
            IEnumerable <ChatDTO> chatDTOs    = service.GetChats(token);

            if (chatDTOs != null)
            {
                foreach (ChatDTO chat in chatDTOs)
                {
                    ChatLookUC soloChatUC = new ChatLookUC();
                    SoloChatVM soloChatVM = new SoloChatVM();

                    soloChatVM.Chat.Id     = chat.Id;
                    soloChatVM.Chat.Img    = chat.Img;
                    soloChatVM.Chat.Name   = chat.Name;
                    soloChatVM.Chat.Status = chat.Status;

                    soloChatUC.DataContext = soloChatVM;



                    soloChatUCs.Add(soloChatUC);
                }
            }

            return(soloChatUCs);
        }