Context items

Topics: CAB & Smart Client Software Factory
Dec 24, 2005 at 9:02 AM
originally posted by: dfoderick

Is there any context where I can store objects (similar to Context.Items)? Is this what rootWorkItem is for? Or should I create a service that "wraps" an object cache?
Dec 24, 2005 at 7:16 PM
originally posted by: BradWilson

The Items collection in any WorkItem should be sufficient. If you want things "globally" accessible, then the most obvious place to put them is in the root WorkItem.
Dec 28, 2005 at 4:26 PM
originally posted by: dfoderick

Yes, Items collection of the rootWorkItem is working.

If you want to add something to the rootwork item during the authentication process you can make your AuthenticationService derive from WorkItem. This gives you access to the RootWorkItem property in which you can stuff your object. Then, in any subsequent work item just pull the object from RootWorkItem.Items.