
Namespace Data

    ''' <summary>
    ''' Represents an item provider for data virtualized items.
    ''' </summary>
    ''' <remarks></remarks>
    Public Interface IVirtualizingItemProvider(Of T)
        ''' <summary>
        ''' Applies the view to the items in the collection.
        ''' </summary>
        ''' <param name="info">The filter to apply.</param>
        ''' <param name="sortExpression">The sort expression to apply.</param>
        ''' <remarks></remarks>
        Sub Apply(ByVal info As FilterInfo, ByVal sortExpression As IList(Of SortField))

        ''' <summary>
        ''' Removes all filters and sort expressions on the items in the collection.
        ''' </summary>
        ''' <remarks></remarks>
        Sub ClearFilters()

        ''' <summary>
        ''' Returns the number of items referenced by this provider.
        ''' </summary>
        ''' <returns>The number of items referenced by this provider.</returns>
        ''' <remarks></remarks>
        Function FetchCount() As Integer

        ''' <summary>
        ''' Returns a list of items corresponding to the specified range.
        ''' </summary>
        ''' <param name="offset">The offset index at which to start.</param>
        ''' <param name="length">The number of items to return.</param>
        ''' <param name="count">Out. The total number of items in the referenced collection.</param>
        ''' <returns>A list of items corresponding to the specified range.</returns>
        ''' <remarks></remarks>
        Function FetchRange(ByVal offset As Integer, ByVal length As Integer, ByRef count As Integer) As IList(Of T)

        ''' <summary>
        ''' Returns a list of all items in the collection.
        ''' </summary>
        ''' <returns>A list of all items in the collection.</returns>
        ''' <remarks></remarks>
        Function FetchAll() As IList(Of T)
    End Interface

End Namespace