Skip to content

Commit

Permalink
Use object initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
FreePhoenix888 committed Feb 17, 2022
1 parent 2b7a56d commit cc461b6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions csharp/Platform.IO.Tests/TemporaryFileTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ public class TemporaryFileTests
[Fact]
public void TemporaryFileTest()
{
var startInfo = new ProcessStartInfo();
startInfo.WorkingDirectory = Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..", "..", "Platform.IO.Tests.TemporaryFileTest"));
startInfo.UseShellExecute = false;
startInfo.RedirectStandardOutput = true;
startInfo.FileName = "dotnet";
startInfo.Arguments = "run --project Platform.IO.Tests.TemporaryFileTest.csproj";
var startInfo = new ProcessStartInfo
{
WorkingDirectory = Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..", "..", "Platform.IO.Tests.TemporaryFileTest")),
UseShellExecute = false,
RedirectStandardOutput = true,
FileName = "dotnet",
Arguments = "run --project Platform.IO.Tests.TemporaryFileTest.csproj"
};
using Process process = new(){StartInfo = startInfo};
process.Start();
var path = process.StandardOutput.ReadLine();
Expand Down

0 comments on commit cc461b6

Please sign in to comment.