コード例 #1
0
 private IObservable <IList <MessageModel> > LoadInitMessages(
     Chat chat)
 {
     return(_chatLoader.LoadChat(chat.ChatData.Id)
            .SelectSeq(c => GetInitMessages(c)
                       .Select(_messageModelFactory.CreateMessage)
                       .ToList())
            .Select(list => list.Reverse().ToList()));
 }
コード例 #2
0
 public IObservable <IList <MessageModel> > LoadNextMessages(
     Chat chat,
     Message fromMessage)
 {
     return(_chatLoader.LoadChat(chat.ChatData.Id)
            .SelectSeq(c => GetNextMessages(c, fromMessage)
                       .Select(_messageModelFactory.CreateMessage)
                       .ToList())
            .Select(list => list.Reverse().Skip(1).ToList()));
 }