예제 #1
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 (FileId != null)
         {
             hashCode = hashCode * 59 + FileId.GetHashCode();
         }
         if (PageRange != null)
         {
             hashCode = hashCode * 59 + PageRange.GetHashCode();
         }
         if (ImageData != null)
         {
             hashCode = hashCode * 59 + ImageData.GetHashCode();
         }
         if (ImageFileId != null)
         {
             hashCode = hashCode * 59 + ImageFileId.GetHashCode();
         }
         hashCode = hashCode * 59 + Quality.GetHashCode();
         hashCode = hashCode * 59 + ColorImageCompression.GetHashCode();
         hashCode = hashCode * 59 + BitonalCompression.GetHashCode();
         if (ImageLayout != null)
         {
             hashCode = hashCode * 59 + ImageLayout.GetHashCode();
         }
         return(hashCode);
     }
 }
예제 #2
0
        /// <summary>
        /// Returns true if PdfDrawImageParameters instances are equal
        /// </summary>
        /// <param name="input">Instance of PdfDrawImageParameters to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PdfDrawImageParameters input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     FileId == input.FileId ||
                     (FileId != null &&
                      FileId.Equals(input.FileId))
                     ) &&
                 (
                     PageRange == input.PageRange ||
                     (PageRange != null &&
                      PageRange.Equals(input.PageRange))
                 ) &&
                 (
                     ImageData == input.ImageData ||
                     (ImageData != null &&
                      ImageData.Equals(input.ImageData))
                 ) &&
                 (
                     ImageFileId == input.ImageFileId ||
                     (ImageFileId != null &&
                      ImageFileId.Equals(input.ImageFileId))
                 ) &&
                 (
                     Quality == input.Quality ||
                     Quality.Equals(input.Quality)
                 ) &&
                 (
                     ColorImageCompression == input.ColorImageCompression ||
                     ColorImageCompression.Equals(input.ColorImageCompression)
                 ) &&
                 (
                     BitonalCompression == input.BitonalCompression ||
                     BitonalCompression.Equals(input.BitonalCompression)
                 ) &&
                 (
                     ImageLayout == input.ImageLayout ||
                     (ImageLayout != null &&
                      ImageLayout.Equals(input.ImageLayout))
                 ));
        }