Пример #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id.GetHashCode();
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsInitial.GetHashCode();
         return(hashCode);
     }
 }
Пример #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Name?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ IsInitial.GetHashCode();
         hashCode = (hashCode * 397) ^ IsCurrent.GetHashCode();
         return(hashCode);
     }
 }
Пример #3
0
        // At least for now, OrderIndex is not used in Equals and GetHashCode methods.

        protected bool Equals(IeState other)
        {
            return(Id.GetValueOrDefault() == other.Id.GetValueOrDefault() && string.Equals(Name, other.Name) &&
                   IsInitial.GetValueOrDefault() == other.IsInitial.GetValueOrDefault() &&
                   string.Equals(Location ?? string.Empty, other.Location ?? string.Empty));
        }