public class DistributedSessionStoreWithStart : DistributedSessionStore, ISessionStore | |
{ | |
readonly IStartSession _startSession; | |
public DistributedSessionStoreWithStart( | |
IDistributedCache cache, | |
ILoggerFactory loggerFactory, | |
IStartSession startSession) | |
: base(cache, loggerFactory) | |
{ | |
_startSession = startSession; | |
} | |
public new ISession Create( | |
string sessionKey, | |
TimeSpan idleTimeout, | |
TimeSpan ioTimeout, | |
Func<bool> tryEstablishSession, | |
bool isNewSessionKey) | |
{ | |
var session = base.Create(sessionKey, idleTimeout, ioTimeout, tryEstablishSession, isNewSessionKey); | |
if (isNewSessionKey) | |
{ | |
_startSession.InvokeStartSesssionActions(session); | |
} | |
return session; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment