semver v2.2.0
WalkerCodeRanger
released this
12 Jun 18:25
·
368 commits
to master
since this release
A minor release to improve comparison. Existing comparison methods and operators were confusing (#15, #26) and had bugs (#39, #53, #69).
- New
ComparePrecedenceTo(SemVersion)
,PrecedenceEquals(Semver)
, and staticComparePrecedence(SemVersion, SemVersion)
andPrecedenceEquals(SemVersion, SemVersion)
methods for comparing precedence - New
CompareSortOrderTo(SemVersion)
and staticCompareSortOrder(SemVersion, SemVersion)
methods for comparing sort order- Use existing
Equals(SemVersion)
andEquals(SemVersion, SemVersion)
to compare sort order equality
- Use existing
- New
PrecedenceComparer
andSortOrderComparer
static properties- Provide a comparer that implements
IEqualityComparer<SemVersion>
andIComparer<SemVersion>
to compare by precedence and sort order respectively - These can be used for sorting, binary search, and using
SemVersion
as a dictionary key
- Provide a comparer that implements
- Marked
Compare(SemVersion, SemVersion)
,CompareByPrecedence(SemVersion)
,CompareTo(SemVersion)
,CompareTo(object)
, andPrecedenceMatches(SemVersion)
obsolete - Marked comparison operators obsolete (#53)