PagedList Implementation for IDocumentQuery

PagedList is an awesome NuGet package and I've been using it with a lot of success in my RavenDB projects. The only issue is when you are using a LuceneQuery it stops to work. So I implemented a DocumentQueryPagedList that properly pages off of IDocumentQuery objects.

Example:

    var result = session
        .Advanced
        .LuceneQuery<Test>()
        .OrderBy(x => x.Id)
        .ToPagedList(1, 10);


Paged List out of the Box (works with no needed modifications):

    var results = session
        .Query<Test>()
        .OrderBy(x => x.Id)
        .ToPagedList(1, 10);


Hope you find this helpful, I know I did.

Khalid