GetAnts() public method

public GetAnts ( ) : Ants
return Ants
Example #1
0
        public bool Check(Ant ant)
        {
            if (Service1 != ant.GetAnts().GetName() && Service2 != ant.GetAnts().GetName())
                return false;

            foreach (var ip in ant.GetAddress())
            {
                if (Check(ip))
                    return true;
            }
            return false;
        }
Example #2
0
        public IEnumerable<byte[]> GetAddress(Ant ant)
        {
            if (Service1 != ant.GetAnts().GetName() && Service2 != ant.GetAnts().GetName())
                return null;

            var _list = new List<byte[]>();
            foreach (var address in ant.GetAddress())
            {
                if (Check(address))
                {
                    _list.Add(address);
                }
            }
            return _list;
        }