88 /// <summary>
99 /// A supbpath is made up of a sequence of connected segments.
1010 /// </summary>
11- public class PdfSubpath
11+ public sealed class PdfSubpath
1212 {
1313 private readonly List < IPathCommand > commands = new List < IPathCommand > ( ) ;
1414
@@ -416,8 +416,10 @@ public interface IPathCommand
416416 /// <summary>
417417 /// Close the current <see cref="PdfSubpath"/>.
418418 /// </summary>
419- public class Close : IPathCommand
419+ public sealed class Close : IPathCommand
420420 {
421+ private static readonly int _hash = typeof ( Close ) . GetHashCode ( ) ;
422+
421423 /// <inheritdoc />
422424 public PdfRectangle ? GetBoundingRectangle ( )
423425 {
@@ -439,15 +441,14 @@ public override bool Equals(object obj)
439441 /// <inheritdoc />
440442 public override int GetHashCode ( )
441443 {
442- // ReSharper disable once BaseObjectGetHashCodeCallInGetHashCode
443- return base . GetHashCode ( ) ;
444+ return _hash ;
444445 }
445446 }
446447
447448 /// <summary>
448449 /// Move drawing of the current <see cref="PdfSubpath"/> to the specified location.
449450 /// </summary>
450- public class Move : IPathCommand
451+ public sealed class Move : IPathCommand
451452 {
452453 /// <summary>
453454 /// The location to move to.
@@ -497,7 +498,7 @@ public override int GetHashCode()
497498 /// <summary>
498499 /// Draw a straight line between two points.
499500 /// </summary>
500- public class Line : IPathCommand
501+ public sealed class Line : IPathCommand
501502 {
502503 /// <summary>
503504 /// The start of the line.
0 commit comments