public static ProcessNode getAllByName(this ProcessNode node, string name, Guid ProgramGuid) { ProcessNode ppNode = node.getNode(name) as ProcessNode; if (ppNode != null) { return(ppNode); } else { Process[] ppNodeList = Process.GetProcessesByName(name); foreach (var item in ppNodeList) { if (ppNode == null) { ppNode = new ProcessNode(item, name, ProgramGuid); } else { ppNode.Add(new ProcessNodeEntry(item, ProgramGuid)); } } return(ppNode); } }
public ProcessNode addChild(ProcessNode node, bool start = true) { if (Child == null) { Child = node; if (start) { Child.start(); } return(Child); } else { return(Child.addChild(node, start)); } }
public ProcessNode(string hash, ProcessStartInfo info, Guid OwnerGuid) : this(new Process(), hash, OwnerGuid) { Entry.RawEntry.StartInfo = info; Child = null; }
public ProcessNode(Process process, String hash, Guid OwnerGuid) : this(new ProcessNodeEntry(process, hash, OwnerGuid)) { Child = null; }