fluid
fluid copied to clipboard
Blacklist members on models
Using Register<Model> is extremely convenient when registering my template models, however there are some circumstances where I don't want specific model members to be accessible. Currently my only option is to register the names of all the specific members I want (whitelist). It would be great if I could instead select members that I don't want (blacklist).
One convenient way of doing this would be marking my members with an opt-out attribute, something like [FluidIgnore].
Happy to make a PR on this.
The only caveat with attributes is that your model has a dependency on Fluid. If you are fine with that, that's good, or we could have an overload of Register<T> that would accept a list of properties that should be ignored.
Any updates on this?
Maybe Jint's MemberFilter predicate could work here too?