private Action<bool> Complete(Dispatcher dispatcher, ResourceModel model) { return result => { dispatcher.Handle(async () => { model.Complete(result); await this.Persist(); }); }; }