/
vasiukoff
/
sg
Обзор
Документация
Войти
/
vasiukoff
/
sg
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/ViewModels/DeleteRemote.cs
38 строк
909 B
leo
refactor: file-system watcher
01 сен 2025, 12:39
01 сен 2025, 12:39
cd80a55
Код
Авторство
О чём код?
using System.Threading.Tasks; namespace SourceGit.ViewModels { public class DeleteRemote : Popup { public Models.Remote Remote { get; private set; } public DeleteRemote(Repository repo, Models.Remote remote) { _repo = repo; Remote = remote; } public override async Task<bool> Sure() { using var lockWatcher = _repo.LockWatcher(); ProgressDescription = "Deleting remote ..."; var log = _repo.CreateLog("Delete Remote"); Use(log); var succ = await new Commands.Remote(_repo.FullPath) .Use(log) .DeleteAsync(Remote.Name); log.Complete(); _repo.MarkBranchesDirtyManually(); return succ; } private readonly Repository _repo = null; } }