Пример #1
0
        /// <inheritdoc />
        protected override void OnStart()
        {
            var hostFactory = Container.Resolve <IEndpointHostFactory>();

            _host = hostFactory.CreateHost(typeof(TestController), null);
            _host.Start();
        }
        /// <summary>
        /// Code executed when service is stopped
        /// </summary>
        protected override void OnStop()
        {
            // Deactivate facades
            DeactivateFacade(_productManagement);

            _host.Stop();
            _host = null;
        }
        /// <summary>
        /// Code executed after OnInitialize
        /// </summary>
        protected override void OnStart()
        {
            // Start Manager
            Container.Resolve <IProductStorage>().Start();
            Container.Resolve <IProductManager>().Start();

            // Start all plugins
            _host = Container.Resolve <IEndpointHostFactory>().CreateHost(typeof(IProductInteraction),
#if USE_WCF
                                                                          Config.InteractionHost);
#else
                                                                          null);
#endif
            _host.Start();

            // Activate facades
            ActivateFacade(_productManagement);
        }