Example #1
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()
        {
            var hashCode = Constants.HashInitializer;

            unchecked
            {
                hashCode = Constants.HashMultiplier * hashCode + IsFolder.GetHashCode();
                hashCode = Constants.HashMultiplier * hashCode + (AccessRights != null ? AccessRights.GetHashCode() : 0);
                hashCode = Constants.HashMultiplier * hashCode + Number.GetHashCode();
                hashCode = Constants.HashMultiplier * hashCode + (Owner != null ? Owner.GetHashCode() : 0);
                hashCode = Constants.HashMultiplier * hashCode + (Group != null ? Group.GetHashCode() : 0);
                hashCode = Constants.HashMultiplier * hashCode + FileSize.GetHashCode();
                hashCode = Constants.HashMultiplier * hashCode + Created.GetHashCode();
                hashCode = Constants.HashMultiplier * hashCode + (Name != null ? Name.GetHashCode() : 0);
            }

            return(hashCode);
        }