Exemple #1
0
 public MessageProcessorFactory(ISandbox sandbox)
 {
     _sandbox = sandbox;
     using (var apiConnection = new GaugeApiConnection(new TcpClientWrapper(Utils.GaugeApiPort)))
     {
         _stepScanner = new MethodScanner(apiConnection, _sandbox);
         InitializeProcessors(_stepScanner);
     }
 }
Exemple #2
0
        public static IGaugeCommand GetExecutor(string phase)
        {
            switch (phase)
            {
            case "--init":
                return(new SetupCommand());

            default:
                return(new StartCommand(() =>
                {
                    using (var apiConnection = new GaugeApiConnection(new TcpClientWrapper(Utils.GaugeApiPort)))
                    {
                        var reflectionWrapper = new ReflectionWrapper();
                        var assemblyLoader = new AssemblyLoader(new AssemblyWrapper(), new AssemblyLocater(new DirectoryWrapper(), new FileWrapper()).GetAllAssemblies(), reflectionWrapper);
                        var activatorWrapper = new ActivatorWrapper();
                        var sandBox = new Sandbox(assemblyLoader, new HookRegistry(assemblyLoader), activatorWrapper, reflectionWrapper);
                        var methodScanner = new MethodScanner(apiConnection, sandBox);
                        var messageProcessorFactory = new MessageProcessorFactory(methodScanner, sandBox, assemblyLoader, activatorWrapper, new TableFormatter(assemblyLoader, activatorWrapper), reflectionWrapper);
                        return new GaugeListener(messageProcessorFactory);
                    }
                },
                                        () => new GaugeProjectBuilder()));
            }
        }
Exemple #3
0
 public MethodScanner(GaugeApiConnection apiConnection, ISandbox sandbox)
 {
     _apiConnection = apiConnection;
     _sandbox       = sandbox;
 }