How to return a value when using event Pub/sub?

Topics: CAB & Smart Client Software Factory
Jul 24, 2006 at 11:35 PM
originally posted by: ching100

When I use event broker of CAB by publish/subscribe,
how can I return a value when fire a new event?

For example, when I publish OnSaveDate(), the event subscriber will receive the event and process SaveData(), but how can I know whether SaveData() successful or not?

Thank you.
Jul 25, 2006 at 4:10 AM
originally posted by: askew

http://www.gotdotnet.com/codegallery/messageboard/thread.aspx?id=941d2228-3bb5-42fd-8004-c08595821170&mbid=62788f36-a963-4feb-8470-20f1a844ed2a&threadid=9630b8a3-9bba-4131-83b3-728812f34d35

You just need another EventArgs<T> class in your Shell's Infrastructure, like an 'EditableEventArgs<T>'.
The link above is to a post that describes doing this for an 'OnCloseQuery' event fired from the Shell.
Jul 29, 2006 at 4:33 AM
originally posted by: ching100

Thanks for your help. I solved this problem.