You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
636 B
18 lines
636 B
4 years ago
|
import SessionManagerFactory from './SessionManagerFactory.ts'
|
||
|
import ModelSessionManager from './ModelSessionManager.ts'
|
||
|
import {Model} from '../../../../orm/src/model/Model.ts'
|
||
|
import {StaticClass} from '../../../../di/src/type/StaticClass.ts'
|
||
|
import SessionInterface from './SessionInterface.ts'
|
||
|
|
||
|
export default class MemorySessionManagerFactory extends SessionManagerFactory {
|
||
|
constructor(
|
||
|
protected readonly ModelClass: StaticClass<SessionInterface, typeof Model>,
|
||
|
) {
|
||
|
super()
|
||
|
}
|
||
|
|
||
|
produce(dependencies: any[], parameters: any[]): any {
|
||
|
return new ModelSessionManager(this.ModelClass)
|
||
|
}
|
||
|
}
|