Working with Lists, Paging and Skipping

Iterating over a List

OpenCMIS (Java)

ItemIterable<Something> somethingList = ...

for (Something something : somethingList) {
    ...
}

PortCMIS (C#)

IItemEnumerable<Something> somethingList = ...

foreach (Something something in somethingList) {
    ...
}

Paging and Skipping

OpenCMIS (Java)

ItemIterable<Something> somethingList = ...

// get a page of 5 items
ItemIterable<Something> firstFive = somethingList.getPage(5);

// get a list starting with the 10th item
ItemIterable<Something> skipTen = somethingList.skipTo(10);

// get a page of 20 items starting at the 100th item of the orignal list
ItemIterable<Something> skipAndPage = somethingList.skipTo(100).getPage(20);

PortCMIS (C#)

IItemEnumerable<Something> somethingList = ...

// get a page of 5 items
IItemEnumerable<Something> firstFive = somethingList.GetPage(5);

// get a list starting with the 10th item
IItemEnumerable<Something> skipTen = somethingList.SkipTo(10);

// get a page of 20 items starting at the 100th item of the orignal list
IItemEnumerable<Something> skipAndPage = somethingList.SkipTo(100).GetPage(20);