Esempio n. 1
0
        private async void AddLikes(
            IReadOnlyList <object> pages
            )
        {
            int count = 0;

            foreach (object page in pages)
            {
                Items.Add((MyFBPage)page);
                if (count == 0)
                {
                    count++;
                    PageGetter pg = new PageGetter();
                    pg.GetPageWithId(((MyFBPage)page).Id);
                }
            }

            if (_likes.HasNext)
            {
                FBResult result = await _likes.NextAsync();

                if (result.Succeeded)
                {
                    IReadOnlyList <object> nextPages =
                        (IReadOnlyList <object>)result.Object;
                    AddLikes(nextPages);
                }
            }
            else
            {
                DoneGetUserLikes();
            }
        }
Esempio n. 2
0
        private async void AddLikes(
            IReadOnlyList<object> pages 
            )
        {
            int count = 0;
            foreach (object page in pages)
            {
                Items.Add((MyFBPage)page);
                if (count == 0)
                {
                    count++;
                    PageGetter pg = new PageGetter();
                    pg.GetPageWithId(((MyFBPage)page).Id);
                }
            }

            if (_likes.HasNext)
            {
                FBResult result = await _likes.Next();
                if (result.Succeeded)
                {
                    IReadOnlyList<object> nextPages = 
                        (IReadOnlyList<object>)result.Object;
                    AddLikes(nextPages);
                }
            }
            else
            {
                DoneGetUserLikes();
            }
        }