コード例 #1
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()));
            }
        }
コード例 #2
0
 public GaugeListener(MessageProcessorFactory messageProcessorFactory)
 {
     _messageProcessorFactory = messageProcessorFactory;
 }
コード例 #3
0
 public GaugeGrpcConnection(Server server, MessageProcessorFactory factory)
 {
     _server  = server;
     _factory = factory;
 }