Skip to content

Leftover ObservableObject XML docs fix, minor tweaks #3505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 6, 2020

Conversation

Sergio0694
Copy link
Member

Leftover from #3429

PR Type

What kind of change does this PR introduce?

  • Code tweaks
  • Documentation content changes

Changes

  • There were two incomplete XML docs for arguments to a SetProperty method
  • The SetProperty<TModel, T>(T, T, TModel, Action<TModel, T>, string?) had an uncostrained type argument TModel. This would've resulted in potential bugs in case the model was a value type, as the instance passed as input to the callback would've been passed by copy, hence the update would've been lost (only the local copy in the callback would've been updated). I've add a where TModel : class constraint to prevent this from happening. I wouldn't expect users to actually try to use that with value types, but anyway the signature is more correct and less error prone now 😄

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Pull Request has been submitted to the documentation repository instructions. Link:
  • Sample in sample app has been added / updated (for bug fixes / features)
  • 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)
  • Contains NO breaking changes

@Sergio0694 Sergio0694 added documentation 📃 improvements ✨ .NET Components which are .NET based (non UWP specific) mvvm-toolkit 🧰 Issues/PRs for the Microsoft.Toolkit.Mvvm package labels Sep 27, 2020
@ghost
Copy link

ghost commented Sep 27, 2020

Thanks Sergio0694 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 ghost requested review from michael-hawker, azchohfi and Kyaa-dost September 27, 2020 13:49
@michael-hawker michael-hawker added this to the 7.0 milestone Sep 28, 2020
@ghost
Copy link

ghost commented Oct 6, 2020

Hello @michael-hawker!

Because this pull request has the auto merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@michael-hawker michael-hawker merged commit 011a4e7 into CommunityToolkit:master Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto merge ⚡ documentation 📃 improvements ✨ mvvm-toolkit 🧰 Issues/PRs for the Microsoft.Toolkit.Mvvm package .NET Components which are .NET based (non UWP specific)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants