question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature proposal: Source generator that implements INotifyPropertyChanged

See original GitHub issue

For classes that are partial and decorated with the [AddINotifyPropertyChangedInterface] attribute the source generator could do the following:

  • Add another partial part of the class that derives from INotifiyPropertyChanged and implements the event.

Fody then will just ignore the [AddINotifyPropertyChangedInterface], since INotifiyPropertyChanged is already implemented, and will continue to do the plumbing of the properties.

Advantage: INotifiyPropertyChanged is then already implemented at compile time, so other code is aware of this.

For non-C# code everything will stay the same as now.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:19 (19 by maintainers)

github_iconTop GitHub Comments

3reactions
ltrzesniewskicommented, Jul 27, 2022

Maybe we should bump the version to v4.0.1 with this feature?

v4.0.0 has over 100k downloads and is picked up with Version="*".

See #867.

2reactions
virzakcommented, Nov 2, 2022

Reported.

Read more comments on GitHub >

github_iconTop Results From Across the Web

canton7/PropertyChanged.SourceGenerator
Powerful INotifyPropertyChanged / INotifyPropertyChanging Source Generator, which generates INPC boilerplate for you as part of your build.
Read more >
Source Generator For INotifyPropertyChanged
As a WPF Developer, one of the things which you would often have to do is to implement INotifyPropertyChange and ensure your properties ......
Read more >
Roslyn Source Generation Reborn, the replace keyword and ...
The original feature of C# 6.0 · Source Generation reborn · The INotifyPropertyChanged case · Implementing the field backed INPC generator.
Read more >
Thinking beyond Roslyn source generators and aspect ...
Implementing INotifyPropertyChanged is a textbook problem for aspect-oriented programming (AOP). Actually, we can say that [AutoNotify] is an ...
Read more >
INotifyPropertyChanged attributes - .NET Community Toolkit
The INotifyPropertyChanged type is an attribute that allows inserting MVVM support code into existing types. Along with other related attributes ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found