System.Diagnostics.Tests.ProcessTests.GetTestProcess C# (CSharp) Method

GetTestProcess() public static method

public static GetTestProcess ( ) : IEnumerable
return IEnumerable
        public static IEnumerable<object[]> GetTestProcess()
        {
            Process currentProcess = Process.GetCurrentProcess();
            yield return new object[] { currentProcess, Process.GetProcessById(currentProcess.Id, "127.0.0.1") };
            yield return new object[] { currentProcess, Process.GetProcessesByName(currentProcess.ProcessName, "127.0.0.1").Where(p => p.Id == currentProcess.Id).Single() };
        }
ProcessTests