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.
29 lines
877 B
29 lines
877 B
import AbstractFactory from '../../../../di/src/factory/AbstractFactory.ts'
|
|
import MemorySession from './MemorySession.ts'
|
|
import Session from './Session.ts'
|
|
import {DependencyRequirement} from '../../../../di/src/type/DependencyRequirement.ts'
|
|
import {Collection} from '../../collection/Collection.ts'
|
|
import SessionInterface from './SessionInterface.ts'
|
|
|
|
/**
|
|
* Base class for IoC container factories that produce sessions.
|
|
* @extends AbstractFactory
|
|
*/
|
|
export default class SessionFactory extends AbstractFactory {
|
|
constructor() {
|
|
super({})
|
|
}
|
|
|
|
produce(dependencies: any[], parameters: any[]): SessionInterface {
|
|
return new MemorySession()
|
|
}
|
|
|
|
match(something: any) {
|
|
return something === Session
|
|
}
|
|
|
|
get_dependency_keys(): Collection<DependencyRequirement> {
|
|
return new Collection<DependencyRequirement>()
|
|
}
|
|
}
|