private Action<long, long> SetProgress(Dispatcher dispatcher, ResourceModel model) { return (received, total) => { dispatcher.Handle(() => model.SetProgress(received, total)); }; }