using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using Diag = System.Diagnostics;
using Trigger.Events;
namespace Trigger.Status
{
///
/// Provides methods to get the status of the currently running tasks
///
public static class Processes
{
///
/// Gets a dictionary with the currently running processes, indexed by PID
///
public static Dictionary RunningDict
{
get
{
Process[] processes = Process.GetProcesses();
Dictionary x = new Dictionary(processes.Length);
foreach (Process process in processes)
x.Add(process.Id, process);
return x;
}
}
///
/// Gets a list with the currently running processes
///
public static List RunningList
{
get
{
return new List(Process.GetProcesses());
}
}
}
}