資源簡(jiǎn)介
支持多核 支持 實(shí)時(shí)讀取
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Diagnostics;
using?System.Threading;
using?Microsoft.VisualStudio.TestTools.UnitTesting;
namespace?Dev.ProcessMonitor.Test
{
????[TestClass]
????public?class?UnitTest1
????{
????????[TestMethod]
????????public?void?GetAllProcess()
????????{
????????????Process[]?processes?=?Process.GetProcesses();
????????????foreach?(Process?process?in?processes)
????????????{
????????????????Console.WriteLine(“Process?Name:?{0}?Responding:?{1}“?process.ProcessName?process.Responding);
????????????}
????????????Console.Write(“press?enter“);
????????}
????????[TestMethod]
????????public?void?GetProcessByName()
????????{
????????????string?processName?=?“conhost“;
????????????var?prcess?=?Process.GetPro
評(píng)論
共有 條評(píng)論