Comments (1)
This has been proposed before (can't find the issues right now), and it's a scenario we're intentionally not supporting. This is for two main reasons: one is that it hides what's going on and makes it not immediately clear when glancing on a property, which members it's actually notifying. The other is that the suggested implementation would be extremely expensive: we'd have to crawl the accessor bodies of all properties, find all expressions, get the semantic model, get the operation, get the target property symbol, and track that in some way. This is definitely not something we want to introduce into our incremental pipeline, as it would slow things down way too much. Additionally it's not even guaranteed it would always work, for instance, what if you have a property that calls some other method which then returns the value of that property that changed? You'd either have to crawl all method bodies of all invoked methods, or say "this isn't supported" and then fail either silently or with some diagnostics, etc. etc. and then you're just back at square one and with a super convoluted implementation that doesn't even always work anyway.
Thank you for taking the time to write the proposal though! 🙂
from dotnet.
Related Issues (20)
- Set PropertyChanged methods protected HOT 2
- Allow ObservablePropertyAttribute on types with INotifyPropertyChanged but not ObservableObject HOT 1
- Can't get FlowExceptionsToTaskScheduler to work for error handling (with TaskScheduler.UnobservedTaskException) HOT 2
- Add an option to [ObservableProperty] - generate a private setter HOT 2
- IconTintColorBehavior throws exception when navigation happens via Shell Tab and app/system theme is changed HOT 1
- Guard.IsNotNull doesn't prevent warning CA1062 on .NET Standard 2.0
- SpeechToText.ListenAsync reports twice HOT 1
- CommandParameters other than Strings are not acceptable for RelayCommands?
- ObserveableProperty and Nullable Can Generate Warnings
- RelayCommand attribute only works in .Net 6 and above?
- Generated code tries to assign to a read only `ObservableCollection` HOT 1
- Factor ObservableObject into separate assembly HOT 4
- Add Custom Attribute Support for Properties Auto-Generated by [ObservableProperty] HOT 3
- Better support for notifying cascading calculated properties HOT 1
- ObservableProperty with NotifyCanExecuteChangedFor exception occurs
- Adding property using [ObservableProperty] breaks hot reload HOT 5
- ObservableProperty attribute with specific accessor HOT 1
- Typo in Guard.ThrowHelper.ThrowArgumentNullExceptionForIsNotNull
- Crash when command parameter is MS.Internal.NamedObject "DisconnectedItem"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotnet.