Commit 5fd9efd
committed
Got SOT working + code cleanup
Refactored `ConsoleGui` and `ShowObjectView` classes to improve readability, maintainability, and adherence to modern C# conventions. Key changes include:
- Updated `FILTER_LABEL` to `_Filter` for UI consistency.
- Simplified `ConsoleGui` initialization logic and removed redundant `SetNeedsDraw` call.
- Rewrote `ShowObjectView` to use nullable fields, modern syntax, and dynamic regex validation.
- Refactored `GetChildren` to handle nested objects with a `while` loop.
- Improved `CachedMemberResult` and `CachedMemberResultElement` with better encapsulation and naming conventions.
- Enhanced `RegexTreeViewTextFilter` with a primary constructor and better regex error handling.
- Simplified `Run` method in `ShowObjectView` for cleaner application lifecycle management.
- Fixed typos in comments and replaced redundant comments with concise explanations.
- General cleanup using modern C# features like expression-bodied methods, pattern matching, and `null`-coalescing operators.1 parent 4245236 commit 5fd9efd
File tree
2 files changed
+166
-233
lines changed- src/Microsoft.PowerShell.ConsoleGuiTools
2 files changed
+166
-233
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | 51 | | |
54 | 52 | | |
| 53 | + | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
| |||
67 | 66 | | |
68 | 67 | | |
69 | 68 | | |
70 | | - | |
| 69 | + | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
| |||
85 | 84 | | |
86 | 85 | | |
87 | 86 | | |
88 | | - | |
89 | | - | |
| 87 | + | |
| 88 | + | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
| |||
383 | 382 | | |
384 | 383 | | |
385 | 384 | | |
386 | | - | |
387 | 385 | | |
388 | 386 | | |
389 | 387 | | |
| |||
0 commit comments