simplify usings
MODIFY
src/TextCopy/BashRunner.cs
src/TextCopy/BashRunner.cs
@@ -9,7 +9,7 @@ static class BashRunner
var errorBuilder = new StringBuilder();
var outputBuilder = new StringBuilder();
var arguments = $"-c \"{commandLine}\"";
- using (var process = new Process
+ using var process = new Process
{
StartInfo = new ProcessStartInfo
{
@@ -20,8 +20,7 @@ static class BashRunner
UseShellExecute = false,
CreateNoWindow = false,
}
- })
- {
+ };
process.Start();
process.OutputDataReceived += (sender, args) => { outputBuilder.AppendLine(args.Data); };
process.BeginOutputReadLine();
@@ -45,4 +44,3 @@ Error: {errorBuilder}";
throw new Exception(error);
}
}
\ No newline at end of file
-}
\ No newline at end of file

simplify usings