I use massive.cs as a DAL, but I create Models that have Lists for their Children.
The problem is I can't figure out a good way to hide those from GetProperties()
. Massive uses that to create the expando object, and without doing heavy editing, I can't think of a good way to hide those properies. Is there an attribute or anything like that?
Massive uses the overload of GetProperties() that takes no parameters (massive.cs:76). As per the documentation, that method "Returns all the public properties of the current Type."
Further, "A property is considered public to reflection if it has at least one accessor that is public." So just make sure the getters and setters are private, or are explicit interface implementations.
It sounds like you are trying to hide some code? If so, you have to change your modifier to internal
or private
from what I assume is public
. Otherwise, you could add a key to make it so that your code cannot be used by others through obfuscation...however, there is no perfect way to hide your code as far as I know...