Microsoft.Protocols.TestManager.Kernel.PipeSinkServer.Stop C# (CSharp) Method

Stop() public static method

Stop PipeSink
public static Stop ( ) : void
return void
        public static void Stop()
        {
            Listener.IgnoreLogs = true;
            if(listeners != null && listeners.Count > 0)
                foreach (var listener in listeners)
                {
                    listener.Stop();
                }
        }

Usage Example

        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);
        }
All Usage Examples Of Microsoft.Protocols.TestManager.Kernel.PipeSinkServer::Stop