Example #1
0
            public void MakeDiffPangoMarkup()
            {
                var d      = new Differ();
                var differ = new SideBySideFullDiffBuilder(d);

                AddressNode pair;

                if (myDuplicateNode.Addresses.Count == 2)
                {
                    pair = myDuplicateNode.Addresses.First(x => x.IsMain != IsMain);
                    var diffRes = differ.BuildDiffModel(pair.Address.Address1c, Address.Address1c);
                    PangoText = PangoRender.RenderDiffLines(diffRes.NewText);
                }
                else
                {
                    if (IsMain)
                    {
                        PangoText = Address.Address1c;
                    }
                    else
                    {
                        pair = myDuplicateNode.Addresses.First(x => x.IsMain);
                        var diffRes = differ.BuildDiffModel(pair.Address.Address1c, Address.Address1c);
                        PangoText = PangoRender.RenderDiffLines(diffRes.NewText);
                    }
                }
            }
Example #2
0
        public void SideBySideDiff(string oldValue, string newValue, out string oldDiff, out string newDiff)
        {
            var d       = new Differ();
            var differ  = new SideBySideFullDiffBuilder(d);
            var diffRes = differ.BuildDiffModel(oldValue, newValue);

            oldDiff = PangoRender.RenderDiffLines(diffRes.OldText);
            newDiff = PangoRender.RenderDiffLines(diffRes.NewText);
        }
Example #3
0
        private void MakeDiffPangoMarkup()
        {
            var d       = new Differ();
            var differ  = new SideBySideFullDiffBuilder(d);
            var diffRes = differ.BuildDiffModel(OldValue, NewValue);

            OldPangoText = PangoRender.RenderDiffLines(diffRes.OldText);
            NewPangoText = PangoRender.RenderDiffLines(diffRes.NewText);
            isPangoMade  = true;
        }