File tree Expand file tree Collapse file tree 4 files changed +72
-0
lines changed
src/Synercoding.Primitives Expand file tree Collapse file tree 4 files changed +72
-0
lines changed Original file line number Diff line number Diff line change @@ -89,5 +89,23 @@ public bool Equals(Point other)
89
89
/// <inheritdoc />
90
90
public override string ToString ( )
91
91
=> $ "X: { X } , Y: { Y } ";
92
+
93
+ /// <summary>
94
+ /// Returns a value that indicates whether two specified <see cref="Point"/> values are equal.
95
+ /// </summary>
96
+ /// <param name="left">The first value to compare.</param>
97
+ /// <param name="right">The second value to compare.</param>
98
+ /// <returns>true if left and right are equal; otherwise, false.</returns>
99
+ public static bool operator == ( Point left , Point right )
100
+ => left . Equals ( right ) ;
101
+
102
+ /// <summary>
103
+ /// Returns a value that indicates whether two specified <see cref="Point"/> values are not equal.
104
+ /// </summary>
105
+ /// <param name="left">The first value to compare.</param>
106
+ /// <param name="right">The second value to compare.</param>
107
+ /// <returns>true if left and right are not equal; otherwise, false.</returns>
108
+ public static bool operator != ( Point left , Point right )
109
+ => ! ( left == right ) ;
92
110
}
93
111
}
Original file line number Diff line number Diff line change @@ -163,5 +163,23 @@ public bool Equals(Rectangle other)
163
163
/// <inheritdoc/>
164
164
public override string ToString ( )
165
165
=> $ "LLX { LLX } , LLY { LLY } , URX { URX } , URY { URY } ";
166
+
167
+ /// <summary>
168
+ /// Returns a value that indicates whether two specified <see cref="Rectangle"/> values are equal.
169
+ /// </summary>
170
+ /// <param name="left">The first value to compare.</param>
171
+ /// <param name="right">The second value to compare.</param>
172
+ /// <returns>true if left and right are equal; otherwise, false.</returns>
173
+ public static bool operator == ( Rectangle left , Rectangle right )
174
+ => left . Equals ( right ) ;
175
+
176
+ /// <summary>
177
+ /// Returns a value that indicates whether two specified <see cref="Rectangle"/> values are not equal.
178
+ /// </summary>
179
+ /// <param name="left">The first value to compare.</param>
180
+ /// <param name="right">The second value to compare.</param>
181
+ /// <returns>true if left and right are not equal; otherwise, false.</returns>
182
+ public static bool operator != ( Rectangle left , Rectangle right )
183
+ => ! ( left == right ) ;
166
184
}
167
185
}
Original file line number Diff line number Diff line change @@ -101,5 +101,23 @@ public bool Equals(Size other)
101
101
/// <inheritdoc/>
102
102
public override string ToString ( )
103
103
=> $ "W: { Width } , H: { Height } ";
104
+
105
+ /// <summary>
106
+ /// Returns a value that indicates whether two specified <see cref="Size"/> values are equal.
107
+ /// </summary>
108
+ /// <param name="left">The first value to compare.</param>
109
+ /// <param name="right">The second value to compare.</param>
110
+ /// <returns>true if left and right are equal; otherwise, false.</returns>
111
+ public static bool operator == ( Size left , Size right )
112
+ => left . Equals ( right ) ;
113
+
114
+ /// <summary>
115
+ /// Returns a value that indicates whether two specified <see cref="Size"/> values are not equal.
116
+ /// </summary>
117
+ /// <param name="left">The first value to compare.</param>
118
+ /// <param name="right">The second value to compare.</param>
119
+ /// <returns>true if left and right are not equal; otherwise, false.</returns>
120
+ public static bool operator != ( Size left , Size right )
121
+ => ! ( left == right ) ;
104
122
}
105
123
}
Original file line number Diff line number Diff line change @@ -121,5 +121,23 @@ public bool Equals(Spacing other)
121
121
&& a . Right == b . Right
122
122
&& a . Bottom == b . Bottom ;
123
123
}
124
+
125
+ /// <summary>
126
+ /// Returns a value that indicates whether two specified <see cref="Spacing"/> values are equal.
127
+ /// </summary>
128
+ /// <param name="left">The first value to compare.</param>
129
+ /// <param name="right">The second value to compare.</param>
130
+ /// <returns>true if left and right are equal; otherwise, false.</returns>
131
+ public static bool operator == ( Spacing left , Spacing right )
132
+ => left . Equals ( right ) ;
133
+
134
+ /// <summary>
135
+ /// Returns a value that indicates whether two specified <see cref="Spacing"/> values are not equal.
136
+ /// </summary>
137
+ /// <param name="left">The first value to compare.</param>
138
+ /// <param name="right">The second value to compare.</param>
139
+ /// <returns>true if left and right are not equal; otherwise, false.</returns>
140
+ public static bool operator != ( Spacing left , Spacing right )
141
+ => ! ( left == right ) ;
124
142
}
125
143
}
You can’t perform that action at this time.
0 commit comments