コード例 #1
0
        /// <summary>
        /// Returns true if ImageRotateParameters instances are equal
        /// </summary>
        /// <param name="input">Instance of ImageRotateParameters to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ImageRotateParameters 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))
                 ) &&
                 (
                     RotationAngle == input.RotationAngle ||
                     RotationAngle.Equals(input.RotationAngle)
                 ) &&
                 (
                     FlipHorizontally == input.FlipHorizontally ||
                     FlipHorizontally.Equals(input.FlipHorizontally)
                 ) &&
                 (
                     FlipVertically == input.FlipVertically ||
                     FlipVertically.Equals(input.FlipVertically)
                 ));
        }
コード例 #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 (FileId != null)
         {
             hashCode = hashCode * 59 + FileId.GetHashCode();
         }
         if (PageRange != null)
         {
             hashCode = hashCode * 59 + PageRange.GetHashCode();
         }
         hashCode = hashCode * 59 + RotationAngle.GetHashCode();
         hashCode = hashCode * 59 + FlipHorizontally.GetHashCode();
         hashCode = hashCode * 59 + FlipVertically.GetHashCode();
         return(hashCode);
     }
 }