public SQLiteStorageEngineFactory(BeakerSQLiteConnection connection) { this.Connection = connection; }
/// <summary> /// Gets the session by the given sessionId. /// If there is no session, a new one is created. /// </summary> /// <returns>The session.</returns> /// <param name="sessionId">Session identifier.</param> public BeakerSQLiteConnection GetSession(Guid sessionId) { lock (sessionLock) { if (this.Connections.ContainsKey(sessionId)) { return this.Connections[sessionId]; } BeakerSQLiteConnection newConnection = new BeakerSQLiteConnection(this.DatabasePath); this.Connections[sessionId] = newConnection; return newConnection; } }