コード例 #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = (int)2166136261;
         hash = hash * 16777619 ^ CostCentre?.GetHashCode() ?? 0;
         hash = hash * 16777619 ^ Account?.GetHashCode() ?? 0;
         hash = hash * 16777619 ^ AccountName?.GetHashCode() ?? 0;
         hash = hash * 16777619 ^ Budget.GetHashCode();
         hash = hash * 16777619 ^ Profile.GetHashCode();
         hash = hash * 16777619 ^ Actuals.GetHashCode();
         hash = hash * 16777619 ^ Variance.GetHashCode();
         hash = hash * 16777619 ^ Forecast.GetHashCode();
         hash = hash * 16777619 ^ OutturnVariance.GetHashCode();
         return(hash);
     }
 }
コード例 #2
0
        public override bool Equals(object obj)
        {
            var other = obj as BcrLine;

            if (other == null)
            {
                return(false);
            }

            return(CostCentre.Equals(other.CostCentre) &&
                   Account == other.Account &&
                   AccountName == other.AccountName &&
                   Budget == other.Budget &&
                   Profile == other.Profile &&
                   Actuals == other.Actuals &&
                   Variance == other.Variance &&
                   Forecast == other.Forecast &&
                   OutturnVariance == other.OutturnVariance);
        }
コード例 #3
0
        public int CompareTo(BcrLine other)
        {
            if (other == null)
            {
                return(1);
            }

            var result = 0;

            if (result == 0)
            {
                result = CostCentre.NullSafeCompareTo(other.CostCentre);
            }
            if (result == 0)
            {
                result = Account.NullSafeCompareTo(other.Account);
            }

            return(result);
        }