public DistributedSessionStoreWithStart(IDistributedCache cache, ILoggerFactory loggerFactory, IStartSession startSession) { innerStore = new DistributedSessionStore(cache, loggerFactory); this.startSession = startSession; logger = loggerFactory.CreateLogger <DistributedSessionStoreWithStart>(); }
protected override void Configure(IApplicationBuilder appBuilder) { DistributedCache = new Mock <IDistributedCache>(MockBehavior.Strict); DistributedSessionStore store = new DistributedSessionStore( DistributedCache.Object, appBuilder.ApplicationServices.GetRequiredService <ILoggerFactory>()); appBuilder.UseBolt( h => { h.UseDistributedSession <IDummyContract, DummyContract>(store); }); }