/// <summary>
        /// Gets the hash code.
        /// </summary>
        /// <returns>The hash code.</returns>
        public override int GetHashCode()
        {
            // see Effective Java by Joshua Bloch
            int hash = 17;

            hash = 37 * hash + _name.GetHashCode();
            hash = 37 * hash + _value.GetHashCode();
            return(hash);
        }
示例#2
0
        /// <summary>
        /// Returns the hash code for this MongoDBRef object.
        /// </summary>
        /// <returns>A 32-bit signed integer hash code.</returns>
        public override int GetHashCode()
        {
            // see Effective Java by Joshua Bloch
            int hash = 17;

            hash = 37 * hash + ((_databaseName == null) ? 0 : _databaseName.GetHashCode());
            hash = 37 * hash + _collectionName.GetHashCode();
            hash = 37 * hash + _id.GetHashCode();
            return(hash);
        }
        /// <summary>
        /// Returns the hash code for this MongoGridFSFileInfo object.
        /// </summary>
        /// <returns>A 32-bit signed integer hash code.</returns>
        public override int GetHashCode()
        {
            // see Effective Java by Joshua Bloch
            int hash = 17;

            hash = 37 * hash + ((_aliases == null) ? 0 : _aliases.GetHashCode());
            hash = 37 * hash + _chunkSize.GetHashCode();
            hash = 37 * hash + ((_contentType == null) ? 0 : _contentType.GetHashCode());
            hash = 37 * hash + ((_id == null) ? 0 : _id.GetHashCode());
            hash = 37 * hash + _length.GetHashCode();
            hash = 37 * hash + ((_md5 == null) ? 0 : _md5.GetHashCode());
            hash = 37 * hash + ((_metadata == null) ? 0 : _metadata.GetHashCode());
            hash = 37 * hash + ((_name == null) ? 0 : _name.GetHashCode());
            hash = 37 * hash + _uploadDate.GetHashCode();
            return(hash);
        }
示例#4
0
        /// <summary>
        /// Gets the hash code.
        /// </summary>
        /// <returns>The hash code.</returns>
        public override int GetHashCode()
        {
            // see Effective Java by Joshua Bloch
            int hash = 17;

            hash = 37 * hash + ((aliases == null) ? 0 : aliases.GetHashCode());
            hash = 37 * hash + chunkSize.GetHashCode();
            hash = 37 * hash + ((contentType == null) ? 0 : contentType.GetHashCode());
            hash = 37 * hash + ((id == null) ? 0 : id.GetHashCode());
            hash = 37 * hash + length.GetHashCode();
            hash = 37 * hash + ((md5 == null) ? 0 : md5.GetHashCode());
            hash = 37 * hash + ((metadata == null) ? 0 : metadata.GetHashCode());
            hash = 37 * hash + name.GetHashCode();
            hash = 37 * hash + uploadDate.GetHashCode();
            return(hash);
        }