async Task ApplyStashAndRemove(int s) { using (IdeApp.Workspace.GetFileStatusTracker()) { if (await GitService.ApplyStash(repository, s)) { stashes.Remove(s); } } }
void ApplyStashAndRemove(Stash s) { using (IdeApp.Workspace.GetFileStatusTracker()) { GitService.ApplyStash(s).Completed += delegate(IAsyncOperation op) { if (op.Success) { stashes.Remove(s); } }; } }
protected void OnButtonDeleteClicked(object sender, System.EventArgs e) { Stash s = GetSelected(); if (s != null) { stashes.Remove(s); Fill(); UpdateButtons(); } }
async Task ApplyStashAndRemove(int s) { try { FileService.FreezeEvents(); if (await GitService.ApplyStash(repository, s)) { stashes.Remove(s); } } finally { FileService.ThawEvents(); } }
internal static void Remove(this StashCollection sc, Stash stash) { int i = 0; foreach (var s in sc) { if (s.FriendlyName == stash.FriendlyName) { sc.Remove(i); break; } ++i; } }