dotvvm
dotvvm copied to clipboard
Improve generated code in capability property accessors
This patch should fix number of problems with capability properties:
- it couldn't handle weird property types (fallback),
- it couldn't handle inherited properties correctly
- yet, it was using DotvvmBindableObject.GetValue for many properties, which is unnecesarily slow
- setting a big capability with 1 property set will set all the other properties to their default value - allocating unnecesary memory
Problem was that we was sometimes using direct access to the properties dictionary, and sometimes we were using GetValue (and friends). This patch decides for each property if it's ok to use direct access or not (i.e. it does not override GetValue & is not inherited), and then acts accordingly.