in JetBrains.Profiler.SelfApi/src/Impl/NuGet.cs [47:71]
public int CompareTo(SemanticVersion other)
{
if (ReferenceEquals(this, other)) return 0;
if (ReferenceEquals(null, other)) return 1;
var cmp = _version.CompareTo(other._version);
if (cmp != 0)
return cmp;
if (string.IsNullOrEmpty(Prerelease))
{
return string.IsNullOrEmpty(other.Prerelease)
? string.Compare(Build, other.Build, StringComparison.Ordinal)
: 1;
}
if (string.IsNullOrEmpty(other.Prerelease))
return -1;
cmp = string.Compare(Prerelease, other.Prerelease, StringComparison.Ordinal);
if (cmp != 0)
return cmp;
return string.Compare(Build, other.Build, StringComparison.Ordinal);
}