Ejemplo n.º 1
0
        private DiffResult[] DiffCore(string textA, string textB, DiffOption option)
        {
            this.linesA = SplitLine(textA, option);
            this.linesB = SplitLine(textB, option);

            if (this.linesB.Length < this.linesA.Length)
            {
                this.isSwap = true;

                string[] tmps = this.linesA;
                this.linesA = this.linesB;
                this.linesB = tmps;
            }
            this.dataA = MakeHash(this.linesA);
            this.dataB = MakeHash(this.linesB);

            this.isSame = delegate(int posA, int posB)
            {
                return((this.dataA[posA] == this.dataB[posB]) && (this.linesA[posA] == this.linesB[posB]));
            };

            return(DetectDiff());
        }
Ejemplo n.º 2
0
 private void SplitChar(string textA, string textB, DiffOption option)
 {
     this.dataA = SplitChar(textA, option);
     this.dataB = SplitChar(textB, option);
 }