An IVersionComparer for NuGetVersion and NuGetVersion types.
Inheritance: IVersionComparer
Exemplo n.º 1
0
 /// <summary>
 /// Compares the given versions using the VersionComparison mode.
 /// </summary>
 public static int Compare(StrictSemanticVersion version1, StrictSemanticVersion version2, VersionComparison versionComparison)
 {
     IVersionComparer comparer = new VersionComparer(versionComparison);
     return comparer.Compare(version1, version2);
 }
Exemplo n.º 2
0
        private static int Compare(StrictSemanticVersion version1, StrictSemanticVersion version2)
        {
            IVersionComparer comparer = new VersionComparer();

            return(comparer.Compare(version1, version2));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Compares NuGetVersion objects using the given comparison mode.
        /// </summary>
        public virtual int CompareTo(StrictSemanticVersion other, VersionComparison versionComparison)
        {
            var comparer = new VersionComparer(versionComparison);

            return(comparer.Compare(this, other));
        }
Exemplo n.º 4
0
        /// <summary>
        /// Compares the given versions using the VersionComparison mode.
        /// </summary>
        public static int Compare(StrictSemanticVersion version1, StrictSemanticVersion version2, VersionComparison versionComparison)
        {
            IVersionComparer comparer = new VersionComparer(versionComparison);

            return(comparer.Compare(version1, version2));
        }