/** <inheritDoc /> */
        public int CompareTo(IgniteProductVersion other)
        {
            IgniteArgumentCheck.NotNull(other, "other");

            // NOTE: Unknown version is less than any other version.
            int res = Major.CompareTo(other.Major);

            if (res != 0)
            {
                return(res);
            }

            res = Minor.CompareTo(other.Minor);

            if (res != 0)
            {
                return(res);
            }

            res = Maintenance.CompareTo(other.Maintenance);

            if (res != 0)
            {
                return(res);
            }

            return(ReleaseDate.CompareTo(other.ReleaseDate));
        }
Beispiel #2
0
            public int CompareTo(VersionInfo vi)
            {
                int cmp = 1;

                if (!ReferenceEquals(vi, null))
                {
                    cmp = Major.CompareTo(vi.Major);
                    if (cmp == 0)
                    {
                        cmp = Minor.CompareTo(vi.Minor);
                    }
                    if (cmp == 0)
                    {
                        cmp = Maintenance.CompareTo(vi.Maintenance);
                    }
                }
                return(cmp);
            }