Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
 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;
 }