/// <summary> /// Initializes a new instance of the <see cref="VirtualizingCollection<T>"/> 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(); }
/// <summary> /// Fetches the count of itmes from the IItemsProvider. /// </summary> /// <returns></returns> protected int FetchCount() { return(ItemsProvider.FetchCount()); }
/// <summary> /// Fetches the count of itmes from the IItemsProvider. /// </summary> /// <returns></returns> protected async Task <long> FetchCount() { return(await ItemsProvider.FetchCount()); }