-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathPerformModelWrapperInterop.cs
More file actions
29 lines (28 loc) · 1.1 KB
/
PerformModelWrapperInterop.cs
File metadata and controls
29 lines (28 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SharpML
{
class PerformModelWrapperInterop
{
public static string PerformDataPiping(string rules, string data, string users, string model, string msoftpass = "True", string tenk = "None")
{
ProcessStartInfo _processStartInfo = new ProcessStartInfo();
_processStartInfo.FileName = model;
_processStartInfo.Arguments = " " + data + " " + users + " " + rules + " " + msoftpass + " " + tenk;
_processStartInfo.CreateNoWindow = true;
_processStartInfo.UseShellExecute = false;
_processStartInfo.RedirectStandardOutput = true;
_processStartInfo.RedirectStandardError = true;
Process myProcess = Process.Start(_processStartInfo);
string error = myProcess.StandardError.ReadToEnd();
string output = myProcess.StandardOutput.ReadToEnd();
Console.WriteLine(error);
return output;
}
}
}