Otis wrote:
I looked for a solution for this for a while, but the problem is: how to make it read-only without a switch property? I mean: Setting a property to show it's read-only, will not work of course, because setting it to false will make it readwrite again. A wrapper like the ArrayList readonly wrapper could be, but that would require new types I think.
I haven't found a way to solve this properly yet.
Hmmm...how about Decorator? Create a read-only entity that wraps the read/write entity but only allows read access. This might prove problematic in terms of collections, relations, etc, but this could be a bullet-proof method of controlling access...admittedly on a chunky, entity-level basis.
Just re-reading your post...I think this is what you're referring to with the ArrayList readonly wrapper...
Jeff...