public static Start ( string pipeName ) : void | ||
pipeName | string | |
return | void |
public static void Start(string pipeName)
{
listeners = new List<Listener>();
PipeName = pipeName;
if (waitingServer == null)
{
waitingServer = new NamedPipeServerStream(PipeName, PipeDirection.InOut, NamedPipeServerStream.MaxAllowedServerInstances, PipeTransmissionMode.Message, PipeOptions.Asynchronous);
waitingServer.BeginWaitForConnection(new AsyncCallback(serverCallback), waitingServer);
}
Listener.IgnoreLogs = false;
}
private Exception Run(string runArgs) { try { vstestProcess = new Process() { StartInfo = new ProcessStartInfo() { WorkingDirectory = WorkingDirectory, FileName = EnginePath, UseShellExecute = false, CreateNoWindow = true, Arguments = runArgs } }; PipeSinkServer.ParseLogMessage = ParseLogMessage; PipeSinkServer.Start(PipeName); vstestProcess.Start(); vstestProcess.WaitForExit(); } catch (Exception exception) { PipeSinkServer.Stop(); return(exception); } return(null); }