Extending Orchard WorkContext

Topics: Customizing Orchard
May 23, 2013 at 7: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 1:14 PM
Is this the right way?
May 24, 2013 at 11:49 PM
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 1:40 PM
Thanks a lot.