Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = IdMonth.GetHashCode();
         hashCode = (hashCode * 397) ^ (Month != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(Month) : 0);
         hashCode = (hashCode * 397) ^ NearMonthOld.GetHashCode();
         hashCode = (hashCode * 397) ^ NearMonthUsdOld.GetHashCode();
         hashCode = (hashCode * 397) ^ FartherMonthOld.GetHashCode();
         hashCode = (hashCode * 397) ^ FartherMonthUsdOld.GetHashCode();
         hashCode = (hashCode * 397) ^ NearYearOld.GetHashCode();
         hashCode = (hashCode * 397) ^ NearYearUsdOld.GetHashCode();
         hashCode = (hashCode * 397) ^ FartherYearOld.GetHashCode();
         hashCode = (hashCode * 397) ^ FartherYearUsdOld.GetHashCode();
         hashCode = (hashCode * 397) ^ NearMonthToday.GetHashCode();
         hashCode = (hashCode * 397) ^ NearMonthUsdToday.GetHashCode();
         hashCode = (hashCode * 397) ^ FartherMonthToday.GetHashCode();
         hashCode = (hashCode * 397) ^ FartherMonthUsdToday.GetHashCode();
         hashCode = (hashCode * 397) ^ NearYearToday.GetHashCode();
         hashCode = (hashCode * 397) ^ NearYearUsdToday.GetHashCode();
         hashCode = (hashCode * 397) ^ FartherYearToday.GetHashCode();
         hashCode = (hashCode * 397) ^ FartherYearUsdToday.GetHashCode();
         return(hashCode);
     }
 }
Exemplo n.º 2
0
        public int CompareTo(ExportAccounting other)
        {
            if (ReferenceEquals(this, other))
            {
                return(0);
            }

            if (ReferenceEquals(null, other))
            {
                return(1);
            }
            var idMonthComparison = IdMonth.CompareTo(other.IdMonth);

            if (idMonthComparison != 0)
            {
                return(idMonthComparison);
            }
            var monthComparison = string.Compare(Month, other.Month, StringComparison.OrdinalIgnoreCase);

            if (monthComparison != 0)
            {
                return(monthComparison);
            }
            var nearMonthOldComparison = NearMonthOld.CompareTo(other.NearMonthOld);

            if (nearMonthOldComparison != 0)
            {
                return(nearMonthOldComparison);
            }
            var nearMonthUsdOldComparison = NearMonthUsdOld.CompareTo(other.NearMonthUsdOld);

            if (nearMonthUsdOldComparison != 0)
            {
                return(nearMonthUsdOldComparison);
            }
            var fartherMonthOldComparison = FartherMonthOld.CompareTo(other.FartherMonthOld);

            if (fartherMonthOldComparison != 0)
            {
                return(fartherMonthOldComparison);
            }
            var fartherMonthUsdOldComparison = FartherMonthUsdOld.CompareTo(other.FartherMonthUsdOld);

            if (fartherMonthUsdOldComparison != 0)
            {
                return(fartherMonthUsdOldComparison);
            }
            var nearYearOldComparison = NearYearOld.CompareTo(other.NearYearOld);

            if (nearYearOldComparison != 0)
            {
                return(nearYearOldComparison);
            }
            var nearYearUsdOldComparison = NearYearUsdOld.CompareTo(other.NearYearUsdOld);

            if (nearYearUsdOldComparison != 0)
            {
                return(nearYearUsdOldComparison);
            }
            var fartherYearOldComparison = FartherYearOld.CompareTo(other.FartherYearOld);

            if (fartherYearOldComparison != 0)
            {
                return(fartherYearOldComparison);
            }
            var fartherYearUsdOldComparison = FartherYearUsdOld.CompareTo(other.FartherYearUsdOld);

            if (fartherYearUsdOldComparison != 0)
            {
                return(fartherYearUsdOldComparison);
            }
            var nearMonthTodayComparison = NearMonthToday.CompareTo(other.NearMonthToday);

            if (nearMonthTodayComparison != 0)
            {
                return(nearMonthTodayComparison);
            }
            var nearMonthUsdTodayComparison = NearMonthUsdToday.CompareTo(other.NearMonthUsdToday);

            if (nearMonthUsdTodayComparison != 0)
            {
                return(nearMonthUsdTodayComparison);
            }
            var fartherMonthTodayComparison = FartherMonthToday.CompareTo(other.FartherMonthToday);

            if (fartherMonthTodayComparison != 0)
            {
                return(fartherMonthTodayComparison);
            }
            var fartherMonthUsdTodayComparison = FartherMonthUsdToday.CompareTo(other.FartherMonthUsdToday);

            if (fartherMonthUsdTodayComparison != 0)
            {
                return(fartherMonthUsdTodayComparison);
            }
            var nearYearTodayComparison = NearYearToday.CompareTo(other.NearYearToday);

            if (nearYearTodayComparison != 0)
            {
                return(nearYearTodayComparison);
            }
            var nearYearUsdTodayComparison = NearYearUsdToday.CompareTo(other.NearYearUsdToday);

            if (nearYearUsdTodayComparison != 0)
            {
                return(nearYearUsdTodayComparison);
            }
            var fartherYearTodayComparison = FartherYearToday.CompareTo(other.FartherYearToday);

            if (fartherYearTodayComparison != 0)
            {
                return(fartherYearTodayComparison);
            }
            return(FartherYearUsdToday.CompareTo(other.FartherYearUsdToday));
        }