Skip to content

Add NotifyPropertyChangedExtensions (WatchProperty, WatchProperties, WatchAllProperties) - #63

Merged
Tyrrrz merged 9 commits into
primefrom
copilot/add-extensions-without-dependencies
Apr 18, 2026
Merged

Tyrrrz merged 9 commits into
primefrom
copilot/add-extensions-without-dependencies

Conversation

Copilot AI commented Apr 18, 2026 •

Copy link
Copy Markdown
Contributor
  • Remove try/catch blocks around watchInitialValue callback in all three methods (WatchProperty, WatchProperties, WatchAllProperties)
  • Return Disposable.Create(...) directly at end of each method
  • Build verified

…es, and WatchAllProperties

Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/f23ebea3-26c0-4bf6-9aff-bb14b3a613dc

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Copilot AI requested a review from Tyrrrz April 18, 2026 19:27
@Tyrrrz
Tyrrrz marked this pull request as ready for review April 18, 2026 19:27
Copilot AI review requested due to automatic review settings April 18, 2026 19:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Ports INotifyPropertyChanged “watch” helpers into PowerKit as source-only extension members, enabling lightweight property-change subscriptions that return IDisposable for easy unsubscription.

Changes:

  • Added WatchProperty, WatchProperties, and WatchAllProperties extension members for INotifyPropertyChanged.
  • Added comprehensive unit tests covering change notifications, initial firing, and disposal/unsubscription behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
PowerKit/Extensions/NotifyPropertyChangedExtensions.cs Implements the new watch/subscription extension members over INotifyPropertyChanged.
PowerKit.Tests/Extensions/NotifyPropertyChangedExtensionsTests.cs Adds tests validating callback firing behavior and unsubscription via IDisposable.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Apr 18, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.78261% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.47%. Comparing base (ca0f66e) to head (75ee22d).
⚠️ Report is 2 commits behind head on prime.

Files with missing lines Patch % Lines
...rKit/Extensions/NotifyPropertyChangedExtensions.cs 75.51% 8 Missing and 4 partials ⚠️
...Extensions/NotifyPropertyChangedExtensionsTests.cs 95.34% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            prime      #63      +/-   ##
==========================================
- Coverage   94.89%   94.47%   -0.43%     
==========================================
  Files         120      122       +2     
  Lines        2332     2425      +93     
  Branches      177      193      +16     
==========================================
+ Hits         2213     2291      +78     
- Misses         85       95      +10     
- Partials       34       39       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…tialValue subscription leak

Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/88b9c9cd-9f7c-4a20-8c23-0ab70970d7c0

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>

Copilot AI commented Apr 18, 2026

Copy link
Copy Markdown
Contributor Author

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:

  • example.com
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/PowerKit/PowerKit/PowerKit.Tests/bin/Release/net10.0/PowerKit.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/PowerKit/PowerKit/PowerKit.Tests/bin/Release/net10.0/PowerKit.Tests.deps.json /home/REDACTED/work/PowerKit/PowerKit/PowerKit.Tests/bin/Release/net10.0/testhost.dll --port 43069 --endpoint 127.0.0.1:043069 --role client --parentprocessid 5090 --datacollectionport 0 --telemetryoptedin false (dns block)
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/PowerKit/PowerKit/PowerKit.Tests/bin/Release/net10.0/PowerKit.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/PowerKit/PowerKit/PowerKit.Tests/bin/Release/net10.0/PowerKit.Tests.deps.json /home/REDACTED/work/PowerKit/PowerKit/PowerKit.Tests/bin/Release/net10.0/testhost.dll --port 40387 --endpoint 127.0.0.1:040387 --role client --parentprocessid 5348 --datacollectionport 0 --telemetryoptedin false (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from Tyrrrz April 18, 2026 19:48
…; init disposable early

Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/a15979aa-5283-4435-b293-e7bbdcc55a2f

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>

Copilot AI commented Apr 18, 2026

Copy link
Copy Markdown
Contributor Author

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:

  • example.com
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/PowerKit/PowerKit/PowerKit.Tests/bin/Release/net10.0/PowerKit.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/PowerKit/PowerKit/PowerKit.Tests/bin/Release/net10.0/PowerKit.Tests.deps.json /home/REDACTED/work/PowerKit/PowerKit/PowerKit.Tests/bin/Release/net10.0/testhost.dll --port 33827 --endpoint 127.0.0.1:033827 --role client --parentprocessid 4127 --datacollectionport 0 --telemetryoptedin false (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@Tyrrrz

Tyrrrz commented Apr 18, 2026

Copy link
Copy Markdown
Owner

@copilot drop the try/catch around watchInitialValue stuff and just return the disposable directly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants