/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // ReSharper disable NonReadonlyMemberInGetHashCode if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } hashCode = hashCode * 59 + DocumentType.GetHashCode(); if (DocumentContent != null) { hashCode = hashCode * 59 + DocumentContent.GetHashCode(); } if (DocumentUrl != null) { hashCode = hashCode * 59 + DocumentUrl.GetHashCode(); } if (Test != null) { hashCode = hashCode * 59 + Test.GetHashCode(); } if (Pipeline != null) { hashCode = hashCode * 59 + Pipeline.GetHashCode(); } if (Strict != null) { hashCode = hashCode * 59 + Strict.GetHashCode(); } if (IgnoreResourceErrors != null) { hashCode = hashCode * 59 + IgnoreResourceErrors.GetHashCode(); } if (IgnoreConsoleMessages != null) { hashCode = hashCode * 59 + IgnoreConsoleMessages.GetHashCode(); } if (Tag != null) { hashCode = hashCode * 59 + Tag.GetHashCode(); } if (Help != null) { hashCode = hashCode * 59 + Help.GetHashCode(); } if (Javascript != null) { hashCode = hashCode * 59 + Javascript.GetHashCode(); } if (Referrer != null) { hashCode = hashCode * 59 + Referrer.GetHashCode(); } if (CallbackUrl != null) { hashCode = hashCode * 59 + CallbackUrl.GetHashCode(); } if (HostedDownloadLimit != null) { hashCode = hashCode * 59 + HostedDownloadLimit.GetHashCode(); } if (HostedExpiresAt != null) { hashCode = hashCode * 59 + HostedExpiresAt.GetHashCode(); } if (PrinceOptions != null) { hashCode = hashCode * 59 + PrinceOptions.GetHashCode(); } // ReSharper restore NonReadonlyMemberInGetHashCode return(hashCode); } }
/// <summary> /// Returns true if Doc instances are equal /// </summary> /// <param name="input">Instance of Doc to be compared</param> /// <returns>Boolean</returns> public bool Equals(Doc input) { if (input == null) { return(false); } return (( Name == input.Name || (Name != null && Name.Equals(input.Name)) ) && ( DocumentType == input.DocumentType || (DocumentType.Equals(input.DocumentType)) ) && ( DocumentContent == input.DocumentContent || (DocumentContent != null && DocumentContent.Equals(input.DocumentContent)) ) && ( DocumentUrl == input.DocumentUrl || (DocumentUrl != null && DocumentUrl.Equals(input.DocumentUrl)) ) && ( Test == input.Test || (Test != null && Test.Equals(input.Test)) ) && ( Pipeline == input.Pipeline || (Pipeline != null && Pipeline.Equals(input.Pipeline)) ) && ( Strict == input.Strict || (Strict != null && Strict.Equals(input.Strict)) ) && ( IgnoreResourceErrors == input.IgnoreResourceErrors || (IgnoreResourceErrors != null && IgnoreResourceErrors.Equals(input.IgnoreResourceErrors)) ) && ( IgnoreConsoleMessages == input.IgnoreConsoleMessages || (IgnoreConsoleMessages != null && IgnoreConsoleMessages.Equals(input.IgnoreConsoleMessages)) ) && ( Tag == input.Tag || (Tag != null && Tag.Equals(input.Tag)) ) && ( Help == input.Help || (Help != null && Help.Equals(input.Help)) ) && ( Javascript == input.Javascript || (Javascript != null && Javascript.Equals(input.Javascript)) ) && ( Referrer == input.Referrer || (Referrer != null && Referrer.Equals(input.Referrer)) ) && ( CallbackUrl == input.CallbackUrl || (CallbackUrl != null && CallbackUrl.Equals(input.CallbackUrl)) ) && ( HostedDownloadLimit == input.HostedDownloadLimit || (HostedDownloadLimit != null && HostedDownloadLimit.Equals(input.HostedDownloadLimit)) ) && ( HostedExpiresAt == input.HostedExpiresAt || (HostedExpiresAt != null && HostedExpiresAt.Equals(input.HostedExpiresAt)) ) && ( ReferenceEquals(PrinceOptions, input.PrinceOptions) || (PrinceOptions != null && PrinceOptions.Equals(input.PrinceOptions)) )); }