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.

Need a way to mark methods as unrelated to PropertyChanged

See original GitHub issue
internal 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:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
SimonCroppcommented, Mar 1, 2018

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 named lyConnectionName

0reactions
CADblokecommented, Apr 5, 2018

I still plan to do this. I guess my “little while” has been distorted by too many enterprise projects.

Read more comments on GitHub >

github_iconTop 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 >

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