That will allow the Name
property of Person
, but nothing else.
If you want something in the middle – you don’t want to register every class and member, and you don’t want to allow everything through – you have some options.
The key is to remember that your template developers can only access what you give them. So instead of giving them a raw person object, give them…less. If you don’t like the idea of giving them “full” objects with a bunch of stuff they shouldn’t output, then don’t give them those objects. Give them safer objects built from those objects.
Perhaps create a “model class” to wrap it, which omits what you don’t want to let through.