Пример #1
0
        public override bool Equals(object other)
        {
            if (!(other is ClientTarget))
            {
                return(false);
            }
            ClientTarget target = (ClientTarget)other;

            return(target.ipAddress.Equals(this.ipAddress));
        }
        public void AddTarget(ClientTarget target)
        {
            lock (this.objLock)
            {
                ClientTarget data = FindByIp(target.ipAddress);

                if (data == null)
                {
                    hostDic[target.ipAddress] = target;
                }
                else
                {
                    //update hostdata
                    hostDic[target.ipAddress] = target;
                }
            }
        }
 public void Remove(ClientTarget target)
 {
     Remove(target.ipAddress);
 }