Exemple #1
0
 /// <summary>
 /// Implement to provide data to the collection.
 /// </summary>
 protected sealed override void Update()
 {
     _context.Synchronize();
     if (_context.Data.Previews == null)
     {
         return;
     }
     Items.Clear();
     foreach (var jsonPreview in _context.Data.Previews)
     {
         var preview = jsonPreview.GetFromCache <ImagePreview>(Auth);
         Items.Add(preview);
     }
 }
Exemple #2
0
        internal sealed override async Task PerformRefresh(bool force, CancellationToken ct)
        {
            await _context.Synchronize(force, ct);

            if (_context.Data.Previews == null)
            {
                return;
            }
            Items.Clear();
            foreach (var jsonPreview in _context.Data.Previews)
            {
                var preview = jsonPreview.GetFromCache <ImagePreview>(Auth);
                Items.Add(preview);
            }
        }
        /// <summary>
        /// Manually updates the collection's data.
        /// </summary>
        /// <param name="ct">(Optional) A cancellation token for async processing.</param>
        public sealed override async Task Refresh(CancellationToken ct = default(CancellationToken))
        {
            await _context.Synchronize(ct);

            if (_context.Data.Previews == null)
            {
                return;
            }
            Items.Clear();
            foreach (var jsonPreview in _context.Data.Previews)
            {
                var preview = jsonPreview.GetFromCache <ImagePreview>(Auth);
                Items.Add(preview);
            }
        }
 /// <summary>
 /// Refreshes the attachment data.
 /// </summary>
 /// <param name="force">Indicates that the refresh should ignore the value in <see cref="TrelloConfiguration.RefreshThrottle"/> and make the call to the API.</param>
 /// <param name="ct">(Optional) A cancellation token for async processing.</param>
 public Task Refresh(bool force = false, CancellationToken ct = default)
 {
     return(_context.Synchronize(force, ct));
 }
Exemple #5
0
 /// <summary>
 /// Refreshes the attachment data.
 /// </summary>
 /// <param name="ct">(Optional) A cancellation token for async processing.</param>
 public async Task Refresh(CancellationToken ct = default(CancellationToken))
 {
     await _context.Synchronize(ct);
 }