Commit 5f72118 1 parent 73f6d32 commit 5f72118 Copy full SHA for 5f72118
File tree 1 file changed +26
-1
lines changed
1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -35,19 +35,44 @@ internal static partial class NativeMethods
35
35
internal const int MOD_NOREPEAT = 0x4000 ;
36
36
37
37
[ StructLayout ( LayoutKind . Sequential ) ]
38
- internal struct LPPOINT
38
+ internal struct LPPOINT : IEquatable < LPPOINT >
39
39
{
40
40
public int X ;
41
41
public int Y ;
42
+
43
+ public override readonly int GetHashCode ( )
44
+ {
45
+ unchecked
46
+ {
47
+ int hash = ( 17 * 37 ) + X ;
48
+ hash = ( hash * 37 ) + Y ;
49
+ return hash ;
50
+ }
51
+ }
52
+
53
+ public override readonly bool Equals ( object ? obj )
54
+ {
55
+ return obj is LPPOINT lpPoint && Equals ( lpPoint ) ;
56
+ }
57
+
58
+ public readonly bool Equals ( LPPOINT other )
59
+ {
60
+ return X == other . X && Y == other . Y ;
61
+ }
62
+
63
+ public static bool operator == ( LPPOINT left , LPPOINT right ) => left . Equals ( right ) ;
64
+ public static bool operator != ( LPPOINT left , LPPOINT right ) => ! left . Equals ( right ) ;
42
65
}
43
66
44
67
// ReSharper disable UnusedMember.Global
68
+ #pragma warning disable CA1028
45
69
internal enum ChangeWindowMessageFilterExAction : uint
46
70
{
47
71
Reset = 0 ,
48
72
Allow = 1 ,
49
73
Disallow = 2
50
74
}
75
+ #pragma warning restore CA1028
51
76
// ReSharper restore UnusedMember.Global
52
77
53
78
[ LibraryImport ( "user32.dll" , EntryPoint = "AddClipboardFormatListener" , SetLastError = true ) ]
You can’t perform that action at this time.
0 commit comments