Пример #1
0
 /// <summary>
 /// Merges the <see cref="Origin"/> with the <see cref="Difference"/>.
 /// </summary>
 public void Merge()
 {
     if (difference == null)
     {
         return;
     }
     BackupDifference();
     origin = origin.ToRegular();
     origin.MergeWith(difference, 0, origin.Descriptor.Count, MergeBehavior.PreferDifference);
     difference = null;
 }
Пример #2
0
 internal void RestoreDifference()
 {
     if (backupedDifference != null)
     {
         origin.MergeWith(backupedDifference.Origin, MergeBehavior.PreferDifference);
         if (difference == null)
         {
             difference = backupedDifference.Difference.Clone();
         }
         else
         {
             difference.MergeWith(backupedDifference, 0, MergeBehavior.PreferDifference);
         }
         backupedDifference = null;
     }
 }