public async Task <NamedPipeResult> RunAsync(NamedPipeSettings namedPipeSettings)
        {
            var log        = Log.Logger; //Create a bridge between ICakeLog and serilog's ILogger
            var p          = RunProcess(namedPipeSettings, BuildArguments(namedPipeSettings));
            var pipeClient = new NamedPipeClient(NamedPipeClientStreamFactory.Create(namedPipeSettings.PipeName, namedPipeSettings.PipeRemoteServerName), namedPipeSettings.CancellationTokenSource.Token, namedPipeSettings.PipeMessageSerializer, namedPipeSettings.TypeMapper, log);
            await pipeClient.ConnectAsync().ConfigureAwait(false);

            return(new NamedPipeResult {
                PipeClient = pipeClient, Process = p, PipeSettings = namedPipeSettings
            });
        }
        public NamedPipeResult Run(NamedPipeSettings namedPipeSettings)
        {
            var log        = Log.Logger; //Create a bridge between ICakeLog and serilog's ILogger
            var p          = RunProcess(namedPipeSettings, BuildArguments(namedPipeSettings));
            var pipeClient = new NamedPipeClient(NamedPipeClientStreamFactory.Create(namedPipeSettings.PipeName, namedPipeSettings.PipeRemoteServerName), namedPipeSettings.CancellationTokenSource.Token, namedPipeSettings.PipeMessageSerializer, namedPipeSettings.TypeMapper, log);

            pipeClient.ConnectAsync().Wait();
            _context?.Log.Information("pipeClient connected");
            return(new NamedPipeResult {
                PipeClient = pipeClient, Process = p, PipeSettings = namedPipeSettings
            });
        }