Commit Graph

4695 Commits

Author SHA1 Message Date
Brandon Thetford
fb364e90bb Let ReSharper know we're a library so it analyzes async better. 2024-02-25 20:39:20 -07:00
Brandon Thetford
799d82986d Add some commentary 2024-02-25 20:39:20 -07:00
Brandon Thetford
7b799a1a3c A collection expression and null coalescing assignment 2024-02-25 20:33:35 -07:00
Brandon Thetford
85698529dc string.Empty 2024-02-25 20:32:49 -07:00
Brandon Thetford
489da798bb Can make that static to avoid a callvirt 2024-02-25 20:32:34 -07:00
Brandon Thetford
99e0a5a83a Condense another switch and annotate nullability 2024-02-25 20:25:14 -07:00
Brandon Thetford
4b462809e5 Condense down to a check for Z and then a single switch return. (performance) 2024-02-25 20:23:17 -07:00
Brandon Thetford
4e1ba721be Only call this once 2024-02-25 20:09:53 -07:00
Brandon Thetford
e3cc13a833 Remove dead code 2024-02-25 20:08:04 -07:00
Brandon Thetford
5ca5b541d7 Only call that method once 2024-02-25 20:07:55 -07:00
Brandon Thetford
be02dcefc9 string interpolation 2024-02-25 20:07:38 -07:00
Brandon Thetford
af0912e05b Use collection expressions (performance) 2024-02-25 20:07:26 -07:00
Brandon Thetford
9fdbea768d Pull these out into statics so we only pay the price once 2024-02-25 20:06:39 -07:00
Brandon Thetford
cbaca4cc71 More .Empty opportunities and commentary 2024-02-25 20:06:00 -07:00
Brandon Thetford
6e8e3aeea5 Condense this down to a switch expression 2024-02-25 20:05:22 -07:00
Brandon Thetford
bfedfee9ee Simplify construction of new Rectangle, Size, Point, and *F instances
Use *.Empty when possible.
Use `with` in a few cases.
Also add some TODO commentary
2024-02-25 20:05:00 -07:00
Brandon Thetford
bbd5177de8 Add aliases for Size and SizeF for UICatalog
Still needed in this csproj because of ambiguous naming from ImageSharp
2024-02-25 16:48:28 -07:00
Brandon Thetford
942e586f3c Switch to namespace import, now that the types are no longer ambiguous 2024-02-25 16:47:28 -07:00
Brandon Thetford
9303af9c44 Remove Size and SizeF 2024-02-25 16:47:03 -07:00
Brandon Thetford
c66951baa0 Remove RectangleF, Point, and PointF 2024-02-25 16:39:15 -07:00
Brandon Thetford
fde275c016 Add type aliases for RectangleF, Point, and PointF 2024-02-25 16:38:59 -07:00
Brandon Thetford
e3f5b8f83c Move this to its own file (it's still a nested class though) 2024-02-23 16:17:04 -07:00
Brandon Thetford
be8a758046 Seal this 2024-02-23 16:17:04 -07:00
Brandon Thetford
d69534823f Move this to its own file and inherit from EventArgs 2024-02-23 16:17:04 -07:00
Brandon Thetford
64488be380 Expand nullability context and mark a couple things nullable 2024-02-23 16:17:04 -07:00
Brandon Thetford
069ff05da2 Invert another statement to reduce nesting even more 2024-02-23 16:17:04 -07:00
Brandon Thetford
ecb6ff9952 Invert this for readability and less nesting 2024-02-23 16:17:04 -07:00
Brandon Thetford
27fe9eeb7d Use proper null check pattern 2024-02-23 16:17:04 -07:00
Brandon Thetford
cb067ece0a Fix comment 2024-02-23 16:17:04 -07:00
Brandon Thetford
8e0a193cab In-line this, which is only used once
The zero checks are redundant. If the point is not inside the rectangle, it isn't inside the rectangle, period.
2024-02-23 16:17:04 -07:00
Brandon Thetford
e9deb280c4 Mark these nullable 2024-02-23 16:17:04 -07:00
Brandon Thetford
0c76b97ef2 Enable null analysis here 2024-02-23 16:17:04 -07:00
Brandon Thetford
6559512a41 Make this static to force us to avoid capturing things from the outer scope. 2024-02-23 16:17:04 -07:00
Brandon Thetford
282c434fda Invert the if for even less nesting 2024-02-23 16:17:04 -07:00
Brandon Thetford
3f3264229f Make the logic positive
This is a fun trick. Saying `is true` covers the null check because the left operand must be something that evaluates to a boolean with a value of `true`.
2024-02-23 16:17:04 -07:00
Brandon Thetford
693d8d1f03 Nullable 2024-02-23 16:17:04 -07:00
Brandon Thetford
4843488bc0 Move local function to end of method 2024-02-23 16:17:04 -07:00
Brandon Thetford
3b2bd3b323 Combine to pattern 2024-02-23 16:17:04 -07:00
Brandon Thetford
8e3538218c Fix XmlDoc
This also fixed it complaining there was no noun after "the"
2024-02-23 16:17:04 -07:00
Brandon Thetford
119426e442 Don't copy this 2024-02-23 16:17:04 -07:00
Brandon Thetford
9adc9d431b Simplify return to null-coalescing return. 2024-02-23 16:17:04 -07:00
Brandon Thetford
987f7d6454 Merge to pattern check
Actually makes the concurrency problem SLIGHTLY better, but not much
2024-02-23 16:17:04 -07:00
Brandon Thetford
2642b0f042 Annotate concurrency problem 2024-02-23 16:17:04 -07:00
Brandon Thetford
e653be2c5f That method returns a nullable result 2024-02-23 16:17:04 -07:00
Brandon Thetford
02b2039aa3 Better name to make spell checker happy (and just nicer anyway) 2024-02-23 16:17:04 -07:00
Brandon Thetford
57a21427b0 Enable nullability analysis here
Going down the rabbit hole
2024-02-23 16:17:04 -07:00
Brandon Thetford
c7d72b9224 Prepare for other event work by making this internal 2024-02-23 16:17:04 -07:00
Brandon Thetford
e6c4184d2d Fix terminology 2024-02-23 16:17:04 -07:00
Brandon Thetford
6f7adcd326 Move local function to end of method 2024-02-23 16:17:04 -07:00
Brandon Thetford
e05fdc2b2f Turn on nullability analysis for this method 2024-02-23 16:17:04 -07:00