public Repository OpenRepository(string path) { if (Repository != null) { CloseRepository(Repository); } Repository = new Repository(path); Program.GetInstance().StashingManager.SetRepository(Repository); InvokeChange(); ChangesWatcher.Watch(path); return(Repository); }
void CloseRepository(Repository r) { ChangesWatcher.End(); Repository.Dispose(); Repository = null; }