Hi,
There are indeed cases where such a thing would be nice, but currently
there is no such thing. What you're already doing is probably the best
workaround, but I would use WeakReferences or a ConditionalWeakTable,
so that the dictionary doesn't hold references to discarded sessions.
/G
Den sön 16 dec. 2018 kl 15:42 skrev Germán Schuager <
gsch...@gmail.com>:
>
> Hi, I often have the requirement to store session related stuff known at session creation that need to be used at some other point in time (for example in event listeners, which are singletons).
> I solved this case in some places using basically a Dictionary<ISession, SessionContext> (SessionContext is another dictionary), but always thought that it would be very useful if ISession would already contain an Items bag for example... is there anything like that?
>
> --
> You received this message because you are subscribed to the Google Groups "nhusers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
nhusers+u...@googlegroups.com.
> To post to this group, send email to
nhu...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/nhusers.
> For more options, visit
https://groups.google.com/d/optout.