문제

I am trying to get the list of UserLists on the account, but I get no entries even though during debugging the TotalNumOfEntries is 17. Screen shot is attached, any ideas why I cant see what these entries are? (sorry the details of debugger came out faint)

enter image description here

Code:

                AdwordsUserListService usrService = (AdwordsUserListService)user.GetService(AdWordsService.v201402.AdwordsUserListService);
                Selector usrSelect = new Selector();
                usrSelect.fields = new String[] { "Id","Name", "Size", "MembershipLifeSpan" };
                    //Use predicates for filtering, if needed, later.
                //Predicate usrPredicate = new Predicate();
                //usrPredicate.field = "Name";
                //usrPredicate.@operator = PredicateOperator.STARTS_WITH;
                //usrPredicate.values = new string[] { "Poly" };
                //usrSelect.predicates = new Predicate[] { usrPredicate };
                usrSelect.paging = new Paging();
                usrSelect.ordering = new OrderBy[] { new OrderBy() { field="Name",sortOrder=SortOrder.ASCENDING} };
                UserListPage userListResult = usrService.get(usrSelect);
                if (userListResult.entries != null)
                {
                    return "Yay!";
                }
도움이 되었습니까?

해결책

Found my problem, I specified paging but didn't specify how many entries, adding this line fixed the problem.

usrSelect.paging.numberResults = 20;

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top