Extending Orchard WorkContext

Topics: Customizing Orchard
May 23, 2013 at 8:39 PM
What's the best way to insert my own Custom context per request ?
Do I just invoke SetState<T> ?
May 24, 2013 at 2:14 PM
Is this the right way?
Developer
May 25, 2013 at 12:49 AM
It's one way and it's not wrong. Alternative ways are adding an item to HttpContext.Items, but I like SetState<T> because it looks cleaner, behaves as a dictionary as well, and has a nice pattern where you can optionally implement IWorkContextStateProvider for advanced value resolution (look at existing implementations to see the potential). I'd totally go for it.
May 27, 2013 at 2:40 PM
Thanks a lot.