Exemplo n.º 1
0
        /// <summary>
        /// Serves as the default hash function.
        /// </summary>
        /// <returns>A hash code for the current object.</returns>
        public override int GetHashCode()
        {
            unchecked
            {
                int hashCode = PayloadId != null?PayloadId.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (DownloadUrl != null ? DownloadUrl.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (int)Status;

                return(hashCode);
            }
        }
Exemplo n.º 2
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((Type != null ? Type.GetHashCode() : 0) ^ (Sha != null ? Sha.GetHashCode() : 0) ^ (Path != null ? Path.GetHashCode() : 0) ^ (GitUrl != null ? GitUrl.GetHashCode() : 0) ^ (HtmlUrl != null ? HtmlUrl.GetHashCode() : 0) ^ (DownloadUrl != null ? DownloadUrl.GetHashCode() : 0) ^ (Encoding != null ? Encoding.GetHashCode() : 0) ^ (Url != null ? Url.GetHashCode() : 0) ^ (Size != null ? Size.GetHashCode() : 0) ^ (Name != null ? Name.GetHashCode() : 0) ^ (Content != null ? Content.GetHashCode() : 0));
     }
 }