コード例 #1
0
        public async void Load(int offset = 0)
        {
            if (_lastOffset == offset || IsLoading)
            {
                return;
            }

            _lastOffset = offset;
            IsLoading   = true;

            _messenger.Publish(new LoadingChangedMessage(this, true));
            try
            {
                List <Pattern> items = await _client.Top(offset);

                foreach (var pattern in items)
                {
                    Items.Add(pattern);
                }
            }
            finally
            {
                IsLoading = false;
                _messenger.Publish(new LoadingChangedMessage(this, false));
            }
        }
コード例 #2
0
        protected override Task <List <Pattern> > LoadMoreItemsOverrideAsync(CancellationToken c, uint count)
        {
            var loadMoreItemsOverrideAsync = _client.Top(this.Count);

            return(loadMoreItemsOverrideAsync);
        }