コード例 #1
0
 public override int GetHashCode()
 {
     if (Flow != null && Item != null && Uom != null && UnitCount != null && StartTime != null && WindowTime != null && EffectiveDate != null)
     {
         return(Flow.GetHashCode() ^ Item.GetHashCode() ^ Uom.GetHashCode() ^ UnitCount.GetHashCode() ^ StartTime.GetHashCode() ^ WindowTime.GetHashCode() ^ EffectiveDate.GetHashCode());
     }
     else
     {
         return(base.GetHashCode());
     }
 }
コード例 #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id;
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Uom != null ? Uom.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsPrimary.GetHashCode();
         hashCode = (hashCode * 397) ^ GroupId;
         hashCode = (hashCode * 397) ^ (Group != null ? Group.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)ValueType;
         //hashCode = (hashCode*397) ^ (Values != null ? Values.GetHashCode() : 0);
         return(hashCode);
     }
 }