Ejemplo n.º 1
0
        public Users Lookup(List<long> UserIdList)
        {
            // Lookup function is limited to 100 id's at a time
            List<string> Lookups = new List<string>();

            for (int i = 0; i < UserIdList.Count(); i += 100)
            {
                var q = (from u in UserIdList
                         select u).Skip(i).Take(100);
                Lookups.Add(string.Join(",", q.ToArray()));
            }

            var user = new UserClient(CurrentUserId);
            var results = new List<WebClientResult<Users>>();
            var list = new Users();
            foreach (string IdSet in Lookups)
            {
                WebClientResult<Users> usersListReturn = user.Lookup(IdSet, null);

                foreach (var u in usersListReturn.Object)
                {
                    list.Add(u);
                }
            }

            return list;
        }