Ejemplo n.º 1
0
        private void RegisterSchemeService(IServiceRegistry container)
        {
            container.Register <ISchemeLocator>(factory =>
            {
                var schemeLocator = new FileSchemeLocator(_schemeCatalog);

                return(schemeLocator);
            }, LightInjectWrapper.CreateSingleton());

            container.Register <ISchemeService, SchemeService>(LightInjectWrapper.CreateSingleton());

            container.Register <ISchemeServiceHandlerFactory, SchemeServiceHandlerFactory>(LightInjectWrapper.CreateSingleton());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Подготовка дополнительных сервисов
        /// </summary>
        private void RegisterAuxServices(IServiceRegistry container)
        {
            var dice = new LinearDice();

            container.Register <IDice>(factory => dice, LightInjectWrapper.CreateSingleton());
        }