Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make propertyChanged and propertyChanging null by default #23

Open
tranb3r opened this issue Dec 14, 2023 · 1 comment
Open

Make propertyChanged and propertyChanging null by default #23

tranb3r opened this issue Dec 14, 2023 · 1 comment

Comments

@tranb3r
Copy link

tranb3r commented Dec 14, 2023

Would it be possible to make propertyChanged / propertyChanging default value null, and generate the code only when OnXXXChanged / OnXXXChanging method is implemented?

It's purely an optimization, to avoid generating code and calling methods for nothing.

What do you think?

@rrmanzano
Copy link
Owner

Hi @tranb3r thanks for your feedback, I will take a look if that is possible, the only implication that I see at this moment is that the library is generating by default a partial method if you don't specify the OnChanged/OnChanging property, and could be the case that the current code is using that partial method. See the example:

Link

I am going to review this case and if possible I will discuss what is the best way to do it if it does not affect the current behavior.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants