未验证 提交 1e97fb9f 编写于 作者: M msftbot[bot] 提交者: GitHub

Merge pull request #49844 from davidwengier/RestoreInternalVersionAPI

Restore internal API used by VS for Mac
......@@ -168,6 +168,25 @@ public bool Equals(VersionStamp version)
public static bool operator !=(VersionStamp left, VersionStamp right)
=> !left.Equals(right);
/// <summary>
/// Check whether given persisted version is re-usable. Used by VS for Mac
/// </summary>
internal static bool CanReusePersistedVersion(VersionStamp baseVersion, VersionStamp persistedVersion)
{
if (baseVersion == persistedVersion)
{
return true;
}
// there was a collision, we can't use these
if (baseVersion._localIncrement != 0 || persistedVersion._localIncrement != 0)
{
return false;
}
return baseVersion._utcLastModified == persistedVersion._utcLastModified;
}
bool IObjectWritable.ShouldReuseInSerialization => true;
void IObjectWritable.WriteTo(ObjectWriter writer)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册