public void LogGenerated(int clientID, string processName, int pid, string message) { string key = ChildProcessLogGeneratorCollection.MakeKey(clientID, processName, pid); if (this.dict.ContainsKey(key)) { this.dict[key].LogGenerated(null, message); } }
public LogGenerator FindGenerator(int clientID, string processName, int pid) { string key = ChildProcessLogGeneratorCollection.MakeKey(clientID, processName, pid); if (this.dict.ContainsKey(key)) { return(this.dict[key]); } return(null); }
public bool MakeGenerator(RCClient client, RCProcess process, int pid) { string key = ChildProcessLogGeneratorCollection.MakeKey(client.ID, process.Name, pid); if (this.dict.ContainsKey(key)) { return(false); } ChildProcessLogGeneratorCollection.ChildProcessLogGenerator childProcessLogGenerator = new ChildProcessLogGeneratorCollection.ChildProcessLogGenerator(client, process, pid); this.dict.Add(key, childProcessLogGenerator); childProcessLogGenerator.OnOpen += this.LogOpened; childProcessLogGenerator.OnClose += this.LogClosed; return(true); }
public ChildProcessLogGenerator(RCClient client, RCProcess process, int pid) : base(ChildProcessLogGeneratorCollection.MakeKey(client.ID, process.Name, pid), string.Format("{0}:{1}-{2}", client.Name, process.Description, pid)) { this.ClientID = client.ID; this.ProcessName = process.Name; this.PID = pid; }