Beispiel #1
0
 public static ISet <string> GetCommandLineArguments()
 {
     using (LOGGER.LogFunction("ClrHandlerHelper::GetCommandLineArguments"))
     {
         CommandLineArguments arguments;
         try
         {
             arguments = BridgeConfigurationProvider.GetBridgeInjector(null).GetInstance <CommandLineArguments>();
         }
         catch (InjectionException e)
         {
             const string error = "Cannot inject command line arguments from driver bridge configuration.";
             Exceptions.CaughtAndThrow(e, Level.Error, error, LOGGER);
             throw;
         }
         return(arguments.Arguments);
     }
 }
        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());
        }
Beispiel #3
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());
        }