public override int GetHashCode()
 {
     unchecked
     {
         int hash = 7;
         hash = 13 * hash * Handler.GetHashCode();
         hash = 13 * hash * ArgumentType.GetHashCode();
         return(hash);
     }
 }
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 Int32 GetHashCode()
 {
     unchecked
     {
         var hashCode = IsOptional.GetHashCode();
         hashCode = (hashCode * 397) ^ (DefaultValue != null ? DefaultValue.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ArgumentType != null ? ArgumentType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ArgumentName != null ? ArgumentName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Position.GetHashCode();
         return(hashCode);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Returns the hash code for this instance.
 /// </summary>
 /// <returns>
 /// A 32-bit signed integer that is the hash code for this instance.
 /// </returns>
 public override Int32 GetHashCode()
 {
     unchecked
     {
         var hashCode = Name?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ (DefaultValue?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (ArgumentType?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ IsOptional.GetHashCode();
         hashCode = (hashCode * 397) ^ Position.GetHashCode();
         return(hashCode);
     }
 }
Exemplo n.º 4
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (CommandName != null
             ? CommandName.GetHashCode()
             : 0);
         hashCode = (hashCode * 397) ^ (CommandType != null
             ? CommandType.GetHashCode()
             : 0);
         hashCode = (hashCode * 397) ^ (ArgumentType != null
             ? ArgumentType.GetHashCode()
             : 0);
         hashCode = (hashCode * 397) ^ (ImplementationType != null
             ? ImplementationType.GetHashCode()
             : 0);
         return(hashCode);
     }
 }