コード例 #1
0
 /// <summary>
 /// Returns the hash code for this instance.
 /// </summary>
 /// <returns>
 /// A 32-bit signed integer that is the hash code for this instance.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = Size.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)Mode;
         hashCode = (hashCode * 397) ^ (int)Position;
         hashCode = (hashCode * 397) ^ (CenterCoordinates?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (int)Resampling;
         hashCode = (hashCode * 397) ^ Compand.GetHashCode();
         return((hashCode * 397) ^ (hashCode * 397) ^ (TargetRectangle?.GetHashCode() ?? 0));
     }
 }
コード例 #2
0
 /// <summary>
 /// Returns the hash code for this instance.
 /// </summary>
 /// <returns>
 /// A 32-bit signed integer that is the hash code for this instance.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Size.GetHashCode();
         hashCode = (hashCode * 397) ^ MaxSize.GetHashCode();
         hashCode = (hashCode * 397) ^ (RestrictedSizes?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (int)ResizeMode;
         hashCode = (hashCode * 397) ^ (int)AnchorPosition;
         hashCode = (hashCode * 397) ^ Upscale.GetHashCode();
         hashCode = (hashCode * 397) ^ (CenterCoordinates?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ AnchorPoint.GetHashCode();
         return(hashCode);
     }
 }