You've already forked com.unity.ide.cursor
mirror of
https://github.com/boxqkrtm/com.unity.ide.cursor.git
synced 2026-05-14 22:30:10 +00:00
com.unity.ide.visualstudio@2.0.20
## [2.0.20] - 2023-06-27 Integration: - Internal API refactoring. ## [2.0.19] - 2023-06-14 Integration: - Add support for Visual Studio Code. Project generation: - Add support for Sdk Style poject generation. - Fix an issue related to missing properties with 2021.3.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.Unity.VisualStudio.Editor
|
||||
@@ -21,19 +22,34 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
{
|
||||
public const int DefaultTimeoutInMilliseconds = 300000;
|
||||
|
||||
public static ProcessStartInfo ProcessStartInfoFor(string filename, string arguments)
|
||||
public static ProcessStartInfo ProcessStartInfoFor(string filename, string arguments, bool redirect = true, bool shell = false)
|
||||
{
|
||||
return new ProcessStartInfo
|
||||
{
|
||||
UseShellExecute = false,
|
||||
UseShellExecute = shell,
|
||||
CreateNoWindow = true,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
RedirectStandardOutput = redirect,
|
||||
RedirectStandardError = redirect,
|
||||
FileName = filename,
|
||||
Arguments = arguments
|
||||
};
|
||||
}
|
||||
|
||||
public static void Start(string filename, string arguments)
|
||||
{
|
||||
Start(ProcessStartInfoFor(filename, arguments, false));
|
||||
}
|
||||
|
||||
public static void Start(ProcessStartInfo processStartInfo)
|
||||
{
|
||||
var process = new Process { StartInfo = processStartInfo };
|
||||
|
||||
using (process)
|
||||
{
|
||||
process.Start();
|
||||
}
|
||||
}
|
||||
|
||||
public static ProcessRunnerResult StartAndWaitForExit(string filename, string arguments, int timeoutms = DefaultTimeoutInMilliseconds, Action<string> onOutputReceived = null)
|
||||
{
|
||||
return StartAndWaitForExit(ProcessStartInfoFor(filename, arguments), timeoutms, onOutputReceived);
|
||||
|
||||
Reference in New Issue
Block a user