示例#1
0
            public override int GetHashCode()
            {
                unchecked // overflow is fine, just wrap
                {
                    var hash = 17;

                    // suitable nullity checks etc, of course :)
                    hash = hash * 23 + IsPrimitive.GetHashCode();
                    hash = hash * 23 + IsArray.GetHashCode();
                    hash = hash * 23 + Properties.GetHashCode();

                    return(hash);
                }
            }
示例#2
0
        public override int GetHashCode()
        {
            if (!_hashComputed)
            {
                _hashCode     = ((DefinedInAssemblyIdentity?.ToString() ?? string.Empty) + (MemberDocId ?? string.Empty) + IsPrimitive.ToString((IFormatProvider)CultureInfo.InvariantCulture)).GetHashCode() ^ CallingAssembly.GetHashCode();
                _hashComputed = true;
            }

            return(_hashCode);
        }
示例#3
0
 public override int GetHashCode()
 {
     if (!_hashComputed)
     {
         _hashCode     = ((DefinedInAssemblyIdentity?.ToString() ?? string.Empty) + (MemberDocId ?? string.Empty) + IsPrimitive.ToString()).GetHashCode() ^ CallingAssembly.GetHashCode();
         _hashComputed = true;
     }
     return(_hashCode);
 }