Merge() public static method

public static Merge ( CompoundDiff left, CompoundDiff right ) : CompoundDiff
left CompoundDiff
right CompoundDiff
return CompoundDiff
Exemplo n.º 1
0
        public static TagCompound Merge(TagCompound parent, TagCompound left, TagCompound right)
        {
            CompoundDiff leftDiff  = Diff(parent, left);
            CompoundDiff rightDiff = Diff(parent, right);
            CompoundDiff diff      = CompoundDiff.Merge(leftDiff, rightDiff);

            TagCompound res = parent.DeepCopy();

            diff.Apply(res);
            return(res);
        }
Exemplo n.º 2
0
        public static TagCompound MergeDetailed(TagCompound parent, TagCompound left, TagCompound right,
                                                out CompoundDiff leftDiff, out CompoundDiff rightDiff, out CompoundDiff mergedDiff)
        {
            leftDiff   = Diff(parent, left);
            rightDiff  = Diff(parent, right);
            mergedDiff = CompoundDiff.Merge(leftDiff, rightDiff);

            TagCompound res = parent.DeepCopy();

            mergedDiff.Apply(res);
            return(res);
        }
Exemplo n.º 3
0
 public static ChangeIdArrayOperation Merge(ChangeObjectOperation left, ChangeObjectOperation right)
 {
     return(new ChangeIdArrayOperation(CompoundDiff.Merge(left.Diff, right.Diff)));
 }