public MessageProcessorFactory(ISandbox sandbox) { _sandbox = sandbox; using (var apiConnection = new GaugeApiConnection(new TcpClientWrapper(Utils.GaugeApiPort))) { _stepScanner = new MethodScanner(apiConnection, _sandbox); InitializeProcessors(_stepScanner); } }
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())); } }
public MethodScanner(GaugeApiConnection apiConnection, ISandbox sandbox) { _apiConnection = apiConnection; _sandbox = sandbox; }