Esempio n. 1
0
        public int CompareTo(ContentMetaKey other)
        {
            if (ReferenceEquals(this, other))
            {
                return(0);
            }
            if (ReferenceEquals(null, other))
            {
                return(1);
            }
            int titleIdComparison = TitleId.CompareTo(other.TitleId);

            if (titleIdComparison != 0)
            {
                return(titleIdComparison);
            }
            int versionComparison = Version.CompareTo(other.Version);

            if (versionComparison != 0)
            {
                return(versionComparison);
            }
            int typeComparison = Type.CompareTo(other.Type);

            if (typeComparison != 0)
            {
                return(typeComparison);
            }
            return(Flags.CompareTo(other.Flags));
        }
Esempio n. 2
0
 public int CompareTo(ContentMetaKey other)
 {
     if (ReferenceEquals(this, other)) return 0;
     if (ReferenceEquals(null, other)) return 1;
     int titleIdComparison = TitleId.CompareTo(other.TitleId);
     if (titleIdComparison != 0) return titleIdComparison;
     int versionComparison = Version.CompareTo(other.Version);
     if (versionComparison != 0) return versionComparison;
     int typeComparison = Type.CompareTo(other.Type);
     if (typeComparison != 0) return typeComparison;
     return Flags.CompareTo(other.Flags);
 }