public void ReloadModules(string valueToSelect = null) { if (String.IsNullOrEmpty(valueToSelect)) { valueToSelect = Module; } List <string> modules; RepoScanner.ScanModules(dBase.svnClient, dBase.GetReleaseRootUrl(), out modules); Modules.Clear(); foreach (var i in modules) { Modules.Add(i); } // if current module still exists, pick it if (!String.IsNullOrEmpty(valueToSelect) && Modules.Contains(valueToSelect)) { ModuleIndex = Modules.IndexOf(valueToSelect); } else if (Modules.Count > 0) { ModuleIndex = 0; } else { ModuleIndex = -1; } }
static void Test5() { var client = new SvnClient(); { List <string> modules; var rootUrl = "file:///D:/Work/svn/BIST/repo/installs"; if (RepoScanner.ScanModules(client, rootUrl, out modules)) { } } { List <string> installs; var rootUrl = "file:///D:/Work/svn/BIST/repo/releases"; if (RepoScanner.ScanInstalls(client, rootUrl, out installs)) { } } }
public void ReloadReleases(string valueToSelect = null) { if (String.IsNullOrEmpty(valueToSelect)) { valueToSelect = Release; } if (!String.IsNullOrEmpty(Module)) { List <string> releases; RepoScanner.ScanReleases( dBase.svnClient, dBase.GetReleaseModuleUrl(Module), out releases ); Releases.Clear(); foreach (var i in releases) { Releases.Add(i); } } else { Releases.Clear(); } // if current release still exist in the list, reload its releases if (!String.IsNullOrEmpty(valueToSelect) && Releases.Contains(valueToSelect)) { ReleaseIndex = Releases.IndexOf(valueToSelect); } else if (Releases.Count > 0) { ReleaseIndex = 0; } else { ReleaseIndex = -1; } }
public void ReloadInstalls(string valueToSelect = null) { if (String.IsNullOrEmpty(valueToSelect)) { valueToSelect = Install; } List <string> installs; RepoScanner.ScanInstalls( dBase.svnClient, dBase.GetInstallRootUrl(), out installs ); Installs.Clear(); foreach (var i in installs) { Installs.Add(i); } // if current module still exists, pick it if (!String.IsNullOrEmpty(valueToSelect) && Installs.Contains(valueToSelect)) { InstallIndex = Installs.IndexOf(valueToSelect); } else if (Installs.Count > 0) { InstallIndex = 0; } else { InstallIndex = -1; } }
public void ScanReposTest() { RepoScanner repoScanner = new RepoScanner(); repoScanner.DoWork(null); }