Need a way to mark methods as unrelated to PropertyChanged
See original GitHub issueinternal bool OnlyConnectionNameChanged(Connection otherConnection)
triggers
MSBUILD : error : Fody: The type Blahblahblah has a On_PropertyName_Changed method (OnlyConnectionNameChanged) that has a non void return value. Ensure the return type void.
because it fits the criteria of
var onChangedMethods = methods.Where(x => !x.IsStatic &&
x.Name.StartsWith("On") &&
x.Name.EndsWith("Changed"));
at https://github.com/Fody/PropertyChanged/blob/master/PropertyChanged.Fody/OnChangedWalker.cs#L26
Workaround is to rename the method to ConnectionNameChangedOnly()
… which is probably the easiest way to mark a method as unrelated to PropertyChanged. If nothing else, at least Google will now return something on that error message.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
c# - WPF: How to trigger PropertyChanged on ...
Let's say I have my own ItemSource in my control. It can assign ObservableCollection type to it, so, the collection could be notified...
Read more >Raising Property Changed events on a Property when it's ...
We are trying to find a way to raise PropertyChanged events on our Unit property when one of its child properties have changed....
Read more >How to: Implement Property Change Notification - WPF . ...
To implement INotifyPropertyChanged you need to declare the PropertyChanged event and create the OnPropertyChanged method.
Read more >Fody/PropertyChanged: Injects INotifyPropertyChanged ...
The INotifyPropertyChanged interface can be automatically implemented for a specific class using the AddINotifyPropertyChangedInterfaceAttribute attribute.
Read more >Xamarin Forms MVVM - INotifyPropertyChanged
So in the two entries and the one label, we just need to set the Path and the Mode, the Source is now...
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
how about check if there is a property that correlates to that method convention. so in this case
OnlyConnectionNameChanged
would not error since there is no property namedlyConnectionName
I still plan to do this. I guess my “little while” has been distorted by too many enterprise projects.