/// <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; }
/// <summary> /// Combines this version with the specified key value tuple and specified version tuple. /// </summary> /// <param name="key">The key to combine.</param> /// <param name="versionInfo">The version info to combine.</param> /// <returns>Combined version info.</returns> internal VersionInfo Combine(Key key, VersionInfo versionInfo) { ArgumentValidator.EnsureArgumentNotNull(key, "key"); Tuple resultVersion = Value; if (resultVersion == null) { resultVersion = key.Value; } else { resultVersion = resultVersion.Combine(key.Value); } if (!versionInfo.IsVoid) { resultVersion = resultVersion.Combine(versionInfo.Value); } return(new VersionInfo(resultVersion.ToRegular())); }