/// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (Fullname != null)
         {
             hashCode = hashCode * 59 + Fullname.GetHashCode();
         }
         if (Firstname != null)
         {
             hashCode = hashCode * 59 + Firstname.GetHashCode();
         }
         if (Lastname != null)
         {
             hashCode = hashCode * 59 + Lastname.GetHashCode();
         }
         if (Nickname != null)
         {
             hashCode = hashCode * 59 + Nickname.GetHashCode();
         }
         if (Systemuserid != null)
         {
             hashCode = hashCode * 59 + Systemuserid.GetHashCode();
         }
         if (Ownerid != null)
         {
             hashCode = hashCode * 59 + Ownerid.GetHashCode();
         }
         return(hashCode);
     }
 }
예제 #2
0
        /// <inheritdoc/>
        public override int GetHashCode()
        {
#pragma warning disable CA1307 // Specify StringComparison
            return(string.IsNullOrEmpty(Fullname) ? 0 : 29 * Fullname.GetHashCode());

#pragma warning restore CA1307 // Specify StringComparison
        }
예제 #3
0
        /// <summary>
        /// Returns a hash code for this instance.
        /// </summary>
        /// <returns>
        /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
        /// </returns>
        public override int GetHashCode()
        {
            int val = Fullname.GetHashCode();

            if (AssemblyName != null)
            {
                val ^= AssemblyName.GetHashCode();
            }
            foreach (var item in TypeArguments)
            {
                val ^= item.GetHashCode();
            }
            val ^= ArrayRanks.Select(x => (int)x).Sum();
            return(base.GetHashCode());
        }
예제 #4
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (Fullname != null)
         {
             hashCode = hashCode * 59 + Fullname.GetHashCode();
         }
         if (ApplicationFunctions != null)
         {
             hashCode = hashCode * 59 + ApplicationFunctions.GetHashCode();
         }
         if (DataPolicies != null)
         {
             hashCode = hashCode * 59 + DataPolicies.GetHashCode();
         }
         return(hashCode);
     }
 }
예제 #5
0
 public override int GetHashCode()
 {
     return(string.IsNullOrEmpty(Fullname) ? 0 : 29 * Fullname.GetHashCode());
 }
예제 #6
0
 private int CalcHashCode()
 {
     return(Scope.GetHashCode() ^ Namespace.GetHashCode() ^ Name.GetHashCode() ^ Fullname.GetHashCode());
 }
예제 #7
0
 public override int GetHashCode()
 {
     return(Fullname.GetHashCode());
 }