Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Name?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ IsUnique.GetHashCode();
         return(hashCode);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>
 /// A hash code for the current <see cref="T:System.Object"/>.
 /// </returns>
 /// <filterpriority>2</filterpriority>
 public override int GetHashCode()
 {
     unchecked
     {
         int result = IsUnique.GetHashCode();
         result = (result * 397) ^ (HashIndexedProps != null ? Collections.GetHashCode(HashIndexedProps) : 0);
         result = (result * 397) ^ (RangeIndexedProps != null ? Collections.GetHashCode(RangeIndexedProps) : 0);
         return(result);
     }
 }
Exemplo n.º 3
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (_displayName != null ? _displayName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DataType != null ? DataType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsUnique.GetHashCode();
         return(hashCode);
     }
 }