I have this object "mySessionObject" of type "SessionObject". It implements the interfaces IMessageHandler<MessageA>
and IMessageHandler<MessageB>
. I should only have one of these objects, and it should live thru the entire HttpSession.
How do I register it with structuremap so that I at any time in the lifetime of the HttpSession can get it by calling ObjectFactory.GetInstance<IMessageHandler<MessageA>>()
, or ObjectFactory.GetInstance<IMessageHandler<MessageB>>()
?