Ejemplo n.º 1
0
        public List <Patch> Diff(int numContextLines = DefaultContext)
        {
            if (matches == null)
            {
                Match();
            }

            var p = new Patch {
                diffs = LineMatching.MakeDiffList(matches, lines1, lines2)
            };

            p.RecalculateLength();
            p.Trim(numContextLines);
            if (p.length1 == 0)
            {
                return(new List <Patch>());
            }

            return(p.Split(numContextLines));
        }
Ejemplo n.º 2
0
 public List <Diff> Diff(IReadOnlyList <string> lines1, IReadOnlyList <string> lines2) => LineMatching.MakeDiffList(Match(lines1, lines2), lines1, lines2);