import { PluginOpaqueId } from '../../server' ; import { IContextContainer , ContextContainer } from './container' ; import { CoreContext } from '../core_context' ; type PrebootDeps = SetupDeps ; export interface SetupDeps { pluginDependencies : ReadonlyMap < PluginOpaqueId , PluginOpaqueId [ ] > ; } internal export class ContextService { constructor ( private readonly core ) { } public preboot ( { pluginDependencies } ) { return this . getContextContainerFactory ( pluginDependencies ) ; } public setup ( { pluginDependencies } ) { return this . getContextContainerFactory ( pluginDependencies ) ; } private getContextContainerFactory ( pluginDependencies ) { return { createContextContainer : ( ) => { return new ContextContainer ( pluginDependencies , this . core . coreId ) ; } , } ; } } internal export type InternalContextPreboot = ContextSetup ; example public export interface ContextSetup { /**
     * Creates a new  IContextContainer for a service owner.
      createContextContainer ( ) : IContextContainer ; }