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.

Provide an analyzer for On....Changed methods

See original GitHub issue

PropertyChanged supports automatically calling functions of the form On…Changed when the value of the related property changes.

The problem arises when the property name changes.

Since the name of the property is embedded in the method name, rename refactoring does not change it.

It is also marked as unused by various tools because nobody calls it directly.

I propose adding an analyzer that

  • Checks if for every On…Changed method checks that a corresponding property exists
    • To avoid conflicts with methods with that name but that do not relate to a property add an attribute such as [UnrelatedToProperty] (or the other way around add one if it should match a property name). Whatever seems better. I believe adding it is better.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
RedX2501commented, Oct 17, 2019
0reactions
GF-Huangcommented, Feb 13, 2023

@GF-Huang what exactly are you missing? #453 made the use case described here obsolete

Sorry, I missing that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change-Point Analyzer - Taylor Enterprises
The Change-Point Analyzer software package for analyzing time ordered data to determine whether a change has taken place. It detects multiple changes and ......
Read more >
Specify an analyzer | Elasticsearch Guide [8.9]
Elasticsearch offers a variety of ways to specify built-in or custom analyzers: By text field, index, or query; For index or search time....
Read more >
Analyzer configuration - Visual Studio (Windows)
Learn how to customize Roslyn analyzer rules. See how to adjust analyzer severities, suppress violations, and designate files as generated ...
Read more >
Focusing on Change Point Detection in Time Series ...
In time series, a change point demonstrates an abrupt change in underlying trends, frequencies, or probability distributions.
Read more >
What is Impact Analysis? Best Practices for doing Change ...
Best practices to deal with change impact analysis. ... Accuracy – Impact Analysis provides essential and accurate information regarding the changes in the ......
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