-
Notifications
You must be signed in to change notification settings - Fork 21
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
Custom getter for properties for lazy loading #23
Comments
Thank you @ADIX7 for this issue. I'll think about custom getters and what makes sense there. |
+1 on this Having a ready-to-use async lazy load implementation would be awesome. |
Hey everyone, this one is open since a while. What's the reason why this could be a great addition? I mean, the properties are read anyway via data binding, so lazy loading wouldn't save much, as everything is loaded from the beginning. Am I missing something? What are the scenarios where you would need this and where it would really improve memory or other things? Thankful for anything that helps me to understand this a bit more. |
It was quit a long time ago, so I'm not sure what was the specific reason I needed this. I think of 2 things:
Also, beside the lazy feature with this we can add logic to the getter (e.g. validation). Although I'm not if this would be the best place for that, but there might be other scenarios where this can be helpful. |
Thank you @ADIX7 , I'll think more about this and consider it for the next release. |
Currently with PropertyCallMethodAttribute we can add method calls for property setters but getters will always only use the backing field.
Please add an other attribute for getter to support lazy loading.
Example:
This getter implementation is just a sample, I'm not sure this is best one.
The text was updated successfully, but these errors were encountered: