Exemple #1
0
        /// <summary>
        /// Returns true if PdfReduceResponse instances are equal
        /// </summary>
        /// <param name="input">Instance of PdfReduceResponse to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PdfReduceResponse input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Error == input.Error ||
                     (Error != null &&
                      Error.Equals(input.Error))
                     ) &&
                 (
                     RemainingTokens == input.RemainingTokens ||
                     RemainingTokens.Equals(input.RemainingTokens)
                 ) &&
                 (
                     ErrorInfo == input.ErrorInfo ||
                     (ErrorInfo != null &&
                      ErrorInfo.Equals(input.ErrorInfo))
                 ) &&
                 (
                     WarningsInfo == input.WarningsInfo ||
                     WarningsInfo != null &&
                     input.WarningsInfo != null &&
                     WarningsInfo.SequenceEqual(input.WarningsInfo)
                 ) &&
                 (
                     ContentRemoved == input.ContentRemoved ||
                     ContentRemoved.Equals(input.ContentRemoved)
                 ) &&
                 (
                     VersionChanged == input.VersionChanged ||
                     VersionChanged.Equals(input.VersionChanged)
                 ) &&
                 (
                     NewFileSize == input.NewFileSize ||
                     NewFileSize.Equals(input.NewFileSize)
                 ));
        }
Exemple #2
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (Error != null)
         {
             hashCode = hashCode * 59 + Error.GetHashCode();
         }
         hashCode = hashCode * 59 + RemainingTokens.GetHashCode();
         if (ErrorInfo != null)
         {
             hashCode = hashCode * 59 + ErrorInfo.GetHashCode();
         }
         if (WarningsInfo != null)
         {
             hashCode = hashCode * 59 + WarningsInfo.GetHashCode();
         }
         hashCode = hashCode * 59 + ContentRemoved.GetHashCode();
         hashCode = hashCode * 59 + VersionChanged.GetHashCode();
         hashCode = hashCode * 59 + NewFileSize.GetHashCode();
         return(hashCode);
     }
 }