Esempio n. 1
0
 public void RemoveListener(User user, int clientID, string processName, int pid)
 {
     LogManager.Key key = LogManager.MakeKey(clientID, processName, pid);
     if (this.dict.ContainsKey(key) && this.dict[key].Contains(user.ClientId))
     {
         this.dict[key].Remove(user.ClientId);
     }
 }
Esempio n. 2
0
        public void ChildProcessLogAdded(object sender, EventArgs <ChildProcessLogMessage> args)
        {
            RCClient rcclient = sender as RCClient;

            LogManager.Key key = LogManager.MakeKey(rcclient.ID, args.Value.ProcessName, args.Value.ProcessID);
            if (this.dict.ContainsKey(key) && this.OnChildProcessLogAdded != null)
            {
                this.OnChildProcessLogAdded(rcclient, new ChildProcessLogEventArgs(this.dict[key], args.Value));
            }
        }
Esempio n. 3
0
        public void AddListener(User user, int clientID, string processName, int pid)
        {
            LogManager.Key key = LogManager.MakeKey(clientID, processName, pid);
            HashSet <int>  hashSet;

            if (!this.dict.ContainsKey(key))
            {
                hashSet = new HashSet <int>();
                this.dict.Add(key, hashSet);
                if (this.OnAddLIstenGroup != null)
                {
                    this.OnAddLIstenGroup(null, new ListenerGroupEventArgs(clientID, processName, pid));
                }
            }
            else
            {
                hashSet = this.dict[key];
            }
            hashSet.Add(user.ClientId);
        }