private void GetFilesFromSlack(FileListOptions options) { if (client == null) { return; } client.GetFiles((response) => { if (options.page == null) { SetStatus($"Receiving first page..."); } else { SetStatus($"Receiving page {options.page}..."); } Dispatcher.BeginInvoke(DispatcherPriority.Input, new Action(() => { AddFiles(response, options); })); }, channel: options.channel, userId: options.userId, from: options.from, to: options.to, count: options.count, page: options.page, types: options.types ); }