public YamsClient(YamsClientConfig config, IIpcConnection initConnection, IIpcConnection exitConnection, IIpcConnection healthConnection) { _config = config; _initConnection = initConnection; _exitConnection = exitConnection; _healthConnection = healthConnection; }
public IYamsClient CreateYamsClient(YamsClientConfig config) { var options = _processArgsParser.ParseArgs(config.ProcessArgs); IpcConnection initConnection = null; IpcConnection exitConnection = null; IpcConnection healthConnection = null; if (!string.IsNullOrEmpty(options.InitializationPipeName)) { initConnection = new IpcConnection(new NamedPipeClientAdapter(options.InitializationPipeName)); } if (!string.IsNullOrEmpty(options.ExitPipeName)) { exitConnection = new IpcConnection(new NamedPipeClientAdapter(options.ExitPipeName)); } if (!string.IsNullOrEmpty(options.HealthPipeName)) { healthConnection = new IpcConnection(new NamedPipeClientAdapter(options.HealthPipeName)); } return(new YamsClient(config, initConnection, exitConnection, healthConnection)); }