コード例 #1
0
        public override int GetHashCode()
        {
            if (_absoluteLocationUri == null && EscapedFileName == null)
            {
                // Typical case where no location is specified
                return(_familyName.GetHashCode());
            }
            else
            {
                // Either we have a URI or a file name, never both
                int hash = (_absoluteLocationUri != null) ?
                           _absoluteLocationUri.GetHashCode() :
                           EscapedFileName.GetHashCode();

                // Combine the location hash with the family name hash
                hash = HashFn.HashMultiply(hash) + _familyName.GetHashCode();
                return(HashFn.HashScramble(hash));
            }
        }
コード例 #2
0
 public override int GetHashCode()
 {
     return(HashFn.HashString(ToStringUpperInvariant(), 0));
 }