コード例 #1
0
 public void Patch()
 {
     AddProjects();
     AddProjectConfigurationPlatforms();
     AddNestedProjects();
     textFilePatcher.Write();
 }
コード例 #2
0
        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();
        }
コード例 #3
0
 public void Patch()
 {
     PatchToolsVersion();
     PatchProjectGuidTags();
     PatchProjectTags();
     AddWindowsTargetPlatformVersion();
     AddPlatformToolset();
     PatchCore();
     textFilePatcher.Write();
 }
コード例 #4
0
        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);
        }