async Task ApplyStashAndRemove(int s) { using (IdeApp.Workspace.GetFileStatusTracker()) { if (await GitService.ApplyStash(repository, s)) { stashes.Remove(s); } } }
protected void OnButtonApplyClicked(object sender, System.EventArgs e) { Stash s = GetSelected(); if (s != null) { GitService.ApplyStash(s); Respond(ResponseType.Ok); } }
protected void OnButtonApplyClicked(object sender, System.EventArgs e) { int s = GetSelectedIndex(); if (s != -1) { GitService.ApplyStash(repository, s); Respond(ResponseType.Ok); } }
void ApplyStashAndRemove(Stash s) { using (IdeApp.Workspace.GetFileStatusTracker()) { GitService.ApplyStash(s).Completed += delegate(IAsyncOperation op) { if (op.Success) { stashes.Remove(s); } }; } }
async Task ApplyStashAndRemove(int s) { try { FileService.FreezeEvents(); if (await GitService.ApplyStash(repository, s)) { stashes.Remove(s); } } finally { FileService.ThawEvents(); } }
protected async void OnButtonApplyClicked(object sender, System.EventArgs e) { int s = GetSelectedIndex(); if (s != -1) { try { FileService.FreezeEvents(); await GitService.ApplyStash(repository, s); } finally { FileService.ThawEvents(); } Respond(ResponseType.Ok); } }
protected void OnButtonApplyRemoveClicked(object sender, System.EventArgs e) { Stash s = GetSelected(); if (s != null) { using (IdeApp.Workspace.GetFileStatusTracker()) { GitService.ApplyStash(s).Completed += delegate(IAsyncOperation op) { if (op.Success) { stashes.Remove(s); } }; } Respond(ResponseType.Ok); } }