public override bool HasNext() { if (index < userInfo.Size()) { return(true); } else { return(false); } }
public override void Run() { Console.WriteLine("ServiceSearchUser Run"); DataAccessInterface dataAccess = new DBTableAccess(); AggregateUser aggregate = (AggregateUser)dataAccess.Search(DataAccessInterface.SearchPattern.Users, param); Console.WriteLine("this is size of Run method in Service class: " + aggregate.Size()); //IteratorUser iu = (IteratorUser)aggregate.Iterator(); //while (iu.HasNext()) //{ // DataListUser dlu = (DataListUser)iu.Next(); // Console.WriteLine("this is Iterator in Run Method: " + dlu.UserName()); //} TypeUserAggregate userInfo = new TypeUserAggregate(aggregate); param.SetParam(userInfo); }