public static string GetListFiles(string lstFiles) { string[] fls = lstFiles.Split('?'); ListOfChanges changes = new ListOfChanges(); FileChange c = null; foreach (string f in fls) { string ff = f.Replace("\"", "").Trim(); if (string.IsNullOrEmpty(ff)) { continue; } if (c == null) { c = new FileChange() { NEW = ff }; changes.Add(c); } else { c.BST = ff; c = null; } } return(ChangesContainer.Add(changes)); }
public string ProcessNewEtalons(List <FileChange> files, string branch) { string fx = Settings.CurrentSettings.BSTADDRESS; string sh = Settings.CurrentSettings.BSTSHARE; foreach (FileChange fc in files) { //legacy dir fixes if (!string.IsNullOrEmpty(fc.ETA)) { int pos = fc.ETA.IndexOf(fx); if (pos > -1) { fc.ETA = sh + fc.ETA.Remove(0, pos + fx.Length).Replace("/", "\\"); } } } return(ChangesContainer.Add(new ListOfChanges(files, branch))); }