using System.Collections.Generic; namespace InfoCenter.Agent.Entities { public class Process { #region private fields private int _pid; private string _name; #endregion #region public properties public int Pid { get { return _pid; } set { _pid = value; } } public string Name { get { return _name; } set { _name = value; } } #endregion public static IList<Process> Processes() { IList<Process> processes = new List<Process>(); foreach (System.Diagnostics.Process process in System.Diagnostics.Process.GetProcesses()) { Process p = new Process(); p.Pid = process.Id; p.Name = process.ProcessName; processes.Add(p); } return processes; } } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)