Esempio n. 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();
         }
         hashCode = hashCode * 59 + CropBoxLeft.GetHashCode();
         hashCode = hashCode * 59 + CropBoxTop.GetHashCode();
         hashCode = hashCode * 59 + CropBoxWidth.GetHashCode();
         hashCode = hashCode * 59 + CropBoxHeight.GetHashCode();
         hashCode = hashCode * 59 + CropUnit.GetHashCode();
         return(hashCode);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Returns true if ImageCropParameters instances are equal
        /// </summary>
        /// <param name="input">Instance of ImageCropParameters to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ImageCropParameters 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))
                 ) &&
                 (
                     CropBoxLeft == input.CropBoxLeft ||
                     CropBoxLeft.Equals(input.CropBoxLeft)
                 ) &&
                 (
                     CropBoxTop == input.CropBoxTop ||
                     CropBoxTop.Equals(input.CropBoxTop)
                 ) &&
                 (
                     CropBoxWidth == input.CropBoxWidth ||
                     CropBoxWidth.Equals(input.CropBoxWidth)
                 ) &&
                 (
                     CropBoxHeight == input.CropBoxHeight ||
                     CropBoxHeight.Equals(input.CropBoxHeight)
                 ) &&
                 (
                     CropUnit == input.CropUnit ||
                     CropUnit.Equals(input.CropUnit)
                 ));
        }