Hi Rocky,
Have you considered adding IManageProperties to CommandBase thus allowing the ObjectFactory to load a property with a private setter?
It would be a 'nice to have' allowing my results property to have a private setter.
The implementation would be similar to ReadOnlyBase.
Regards
Peran
That is a good idea, do you want to add an entry to the wish list for this?
Added an enhancement as issue 890.
Peran
I see the suggestion still has "no priority". Is there a work-around for this? How can I use an "Exists" command with the ObjectFactory if I can't populate the result property?
Workarounds:
a) Use ReadOnlyBase as base class (like unit-of-work)
b) Use normal C# properties (of serializable content; public if using SL)
I really didn't like the idea of having the result property publicly settable. A ReadOnlyBase UoW-like implementation seems like a much better idea. I had apparently overlooked that sample in Rocky's book and was focused on the CommandBase UoW examples (and getting wrapped up with calling Execute() for all command-like behaviors). Thanks for the quick response!
Copyright (c) Marimer LLC