public void Patch() { AddProjects(); AddProjectConfigurationPlatforms(); AddNestedProjects(); textFilePatcher.Write(); }
public void Patch() { int startIndex = GetStartOfVersionTable(); int endIndex = GetEndOfVersionTable(startIndex); textFilePatcher.Insert(endIndex, $"{unityVersion} | {unityGitHash}"); textFilePatcher.Lines.Sort(startIndex, endIndex - startIndex + 1, VersionTableComparer.Instance); textFilePatcher.Write(); }
public void Patch() { PatchToolsVersion(); PatchProjectGuidTags(); PatchProjectTags(); AddWindowsTargetPlatformVersion(); AddPlatformToolset(); PatchCore(); textFilePatcher.Write(); }
public static bool RemoveLines(string filename, Func <TextLine, bool> shouldRemove) { if (shouldRemove == null) { throw new ArgumentNullException(nameof(shouldRemove)); } var patcher = new TextFilePatcher(filename); bool removedLines = patcher.RemoveLines(shouldRemove); if (removedLines) { patcher.Write(); } return(removedLines); }