Feature proposal: Source generator that implements INotifyPropertyChanged
See original GitHub issueFor 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:
- Created a year ago
- Reactions:3
- Comments:19 (19 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
Reported.