WindowsCommunityToolkit icon indicating copy to clipboard operation
WindowsCommunityToolkit copied to clipboard

Fixed scoped delegate capture in NetworkConnectionStateTrigger

Open Arlodotexe opened this issue 2 years ago • 1 comments

Related to #4059

PR Type

What kind of change does this PR introduce?

The OnEventAction used in NetworkConnectionStateTrigger was capturing this to attach the event. This PR makes the delegate static so it doesn't capture this.

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • [x] Based off latest main branch of toolkit
  • [x] Tested code with current supported SDKs
  • [ ] New component
    • [ ] Pull Request has been submitted to the documentation repository instructions. Link:
    • [ ] Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
    • [ ] If control, added to Visual Studio Design project
  • [ ] Sample in sample app has been added / updated (for bug fixes / features)
  • [ ] New major technical changes in the toolkit have or will be added to the Wiki e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
  • [ ] Tests for the changes have been added (for bug fixes / features) (if applicable)
  • [ ] Header has been added to all new source files (run build/UpdateHeaders.bat)
  • [x] Contains NO breaking changes

Other information

n/a

Arlodotexe avatar Sep 20 '22 14:09 Arlodotexe

Thanks Arlodotexe for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

ghost avatar Sep 20 '22 14:09 ghost

Resolved in 60d61ad62a22030de99c488cde3fb2fba8c24856, #4787

Arlodotexe avatar Oct 27 '22 16:10 Arlodotexe