コード例 #1
0
 public async Task QueryTopicLastTest()
 {
     CommonProvider common = new CommonProvider();
     List<TopicLastResult> user = await common.QueryTopicLast("26293", 0);
     Assert.IsNotNull(user);
 }
コード例 #2
0
        private async Task QueryLast()
        {
            if (SelectedItem == null) return;

            if (lastPage == 0)
            {
                if (LastNotes == null)
                {
                    LastNotes = new ObservableCollection<TopicLastItem>();
                }
                else
                {
                    LastNotes.Clear();
                }
            }

            CommonProvider common = new CommonProvider();
            List<TopicLastResult> result = await common.QueryTopicLast(SelectedItem.Id.ToString(), lastPage);

            result.ForEach(x => LastNotes.Add(ConvertToTopicLastItem(x)));

            if (LastNotes?.Any() == true)
            {
                lastPage = LastNotes.Last().Id - 1;
            }

        }