Add RegistryHive extension members: Moniker and OpenKey#66
Conversation
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/3a9e2843-1057-43c1-aa2d-bc023ddd6293 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Ports RegistryHive extension helpers into PowerKit by extending RegistryExtensions with a new extension(RegistryHive hive) block, complementing the existing RegistryKey extensions.
Changes:
- Added
RegistryHive.GetShortMoniker()to map common hives to short names (e.g.,HKCU,HKLM). - Added
RegistryHive.OpenKey(RegistryView view = RegistryView.Default)(guarded forNET40_OR_GREATER || NET5_0_OR_GREATER) as a wrapper overRegistryKey.OpenBaseKey.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot please fix build errors |
|
@copilot fix build errors |
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/75ed03a7-5e7f-4e3a-8760-1459ec305cc4 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## prime #66 +/- ##
==========================================
- Coverage 94.89% 93.98% -0.92%
==========================================
Files 120 124 +4
Lines 2332 2459 +127
Branches 177 197 +20
==========================================
+ Hits 2213 2311 +98
- Misses 85 107 +22
- Partials 34 41 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Ports
RegistryHiveextensions from LightBulb into PowerKit, extending the existingRegistryExtensionswith a newextension(RegistryHive hive)block.Changes
Moniker— property that maps aRegistryHivevalue to its conventional short name (HKCU,HKLM,HKCR,HKU,HKPD,HKCC); annotated with[SupportedOSPlatform("windows")]sinceRegistryHiveenum values are Windows-only on .NET 5+.OpenKey(RegistryView view = RegistryView.Default)— wrapsRegistryKey.OpenBaseKey; guarded with#if NET40_OR_GREATER || NET5_0_OR_GREATERsinceRegistryViewand the correspondingOpenBaseKeyoverload are unavailable on .NET 3.5.