Powerful INotifyPropertyChanged / INotifyPropertyChanging Source Generator, which generates INPC boilerplate for you as part of your build. Supports features such as automatic and manual dependencies between properties, notifications when specific properties change, and more.
Description
I get INPC006 when used inside Window derived class:
warning INPC006: Found one or more methods called 'OnPropertyChanged' to raise the PropertyChanged event, but they had an unrecognised signatures or were inaccessible. No PropertyChanged events will be raised from this type
warning CS0067: Событие "MainWindow.PropertyChanged" никогда не используется.
To Reproduce
Create WPF project.
Add any [Notify] field to MainWindow.xaml.cs.
Compile.
Version Info
PropertyChanged.SourceGenerator version: 1.0.6
Roslyn Version: "4.4.0-3.22518.13 (7856a68c)". Версия языка: 10.0.
Additional Info
class Window is derived from DependencyObject which contains protected virtual void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
It's not usual to implement INPC in your views. You've got DependencyProperties available there. If you need to do that, add your own OnPropertyChanged method which has a compatible signature.
Description I get INPC006 when used inside Window derived class: warning INPC006: Found one or more methods called 'OnPropertyChanged' to raise the PropertyChanged event, but they had an unrecognised signatures or were inaccessible. No PropertyChanged events will be raised from this type warning CS0067: Событие "MainWindow.PropertyChanged" никогда не используется.
To Reproduce Create WPF project. Add any
[Notify]
field to MainWindow.xaml.cs. Compile.Version Info
Additional Info class
Window
is derived fromDependencyObject
which containsprotected virtual void OnPropertyChanged(DependencyPropertyChangedEventArgs e)