Exemplo n.º 1
0
        /// <summary>
        /// Returns the collection of objects for the prop with the given name
        /// for this page.
        /// The collection is lazy and causes secondary paging to progress if necessary.
        /// </summary>
        public IEnumerable <T> GetData <T>(string name)
        {
            var dataList = GetOrCreateDataList(name);

            int i = 0;

            while (true)
            {
                while (dataList.Count <= i && m_pagingManager.HasMore(name))
                {
                    m_pagingManager.GetMore();
                }

                if (dataList.Count <= i)
                {
                    break;
                }

                yield return((T)dataList[i++]);
            }
        }