private static BridgeHandlerManager GetHandlers(string httpServerPortNumber, IEvaluatorRequestor evaluatorRequestor)
        {
            var injector = BridgeConfigurationProvider.GetBridgeInjector(evaluatorRequestor);

            try
            {
                var port = injector.GetInstance <HttpServerPort>();
                port.PortNumber = httpServerPortNumber == null
                    ? 0
                    : int.Parse(httpServerPortNumber, CultureInfo.InvariantCulture);

                _driverBridge = injector.GetInstance <DriverBridge>();
            }
            catch (Exception e)
            {
                Exceptions.CaughtAndThrow(e, Level.Error, "Cannot get instance.", LOGGER);
            }

            return(_driverBridge.Subscribe());
        }
Exemple #2
0
        private static ulong[] GetHandlers(string httpServerPortNumber, IEvaluatorRequestor evaluatorRequestor)
        {
            var injector = BridgeConfigurationProvider.GetBridgeInjector(evaluatorRequestor);

            try
            {
                var port = injector.GetInstance <HttpServerPort>();
                port.PortNumber = httpServerPortNumber == null
                    ? 0
                    : int.Parse(httpServerPortNumber, CultureInfo.InvariantCulture);

                //TODO: Remove next 2 lines after Obsolete period
                var startHandler = injector.GetInstance <IStartHandler>();
                LOGGER.Log(Level.Info, "Start handler set to be " + startHandler.Identifier);
                _driverBridge = injector.GetInstance <DriverBridge>();
            }
            catch (Exception e)
            {
                Exceptions.CaughtAndThrow(e, Level.Error, "Cannot get instance.", LOGGER);
            }

            return(_driverBridge.Subscribe());
        }