/// <summary>
 /// Initializes a new instance of the <see cref="VirtualizingCollection&lt;T&gt;"/> class.
 /// </summary>
 /// <param name="itemsProvider">The items provider.</param>
 /// <param name="pageSize">Size of the page.</param>
 /// <param name="pageTimeout">The page timeout.</param>
 public VirtualizingCollection(IItemsProvider <T> itemsProvider, int pageSize, int pageTimeout)
 {
     _itemsProvider = itemsProvider;
     _pageSize      = pageSize;
     _pageTimeout   = pageTimeout;
     ItemCount      = ItemsProvider.FetchCount();
 }
예제 #2
0
 /// <summary>
 /// Fetches the count of itmes from the IItemsProvider.
 /// </summary>
 /// <returns></returns>
 protected int FetchCount()
 {
     return(ItemsProvider.FetchCount());
 }
예제 #3
0
 /// <summary>
 /// Fetches the count of itmes from the IItemsProvider.
 /// </summary>
 /// <returns></returns>
 protected async Task <long> FetchCount()
 {
     return(await ItemsProvider.FetchCount());
 }