Beispiel #1
0
        async Task Load()
        {
            string after = null;

            while (true)
            {
                var page = await load(after);

                foreach (var item in page.Items)
                {
                    var vm = new ActorViewModel(item);
                    users.Add(vm);
                }

                after = page.EndCursor;
                if (!page.HasNextPage)
                {
                    break;
                }
            }
        }
 /// <summary>
 /// Intializes a new instance of the <see cref="CommentThreadViewModel"/> class.
 /// </summary>
 /// <param name="currentUser">The current user.</param>
 protected Task InitializeAsync(ActorModel currentUser)
 {
     Guard.ArgumentNotNull(currentUser, nameof(currentUser));
     CurrentUser = new ActorViewModel(currentUser);
     return(Task.CompletedTask);
 }