Skip to main content

BrowseWithPaging

Browse Returns only the References list and discards the rest ContinuationPoint; suitable for scenarios where there are "few known child nodes." The number of child nodes may exceed 1000 Nodes within the (SDK single-page limit) are explicitly BrowseWithPaging retrieved using BrowsePage.

Prerequisite Reading

Signature​

public BrowsePage BrowseWithPaging(string nodeId, NodeClass filter = NodeClass.Unspecified);

Usage​

var page = ua.BrowseWithPaging("ns=2;s=BigFolder");
Console.WriteLine($"Got {page.References.Count} children, more = {page.ContinuationPoint != null}");

if (page.ContinuationPoint != null)
{
var next = ua.BrowseNext(page.ContinuationPoint);
Console.WriteLine($"Next page: {next.References.Count} more children");
}

When to Use Browse vs BrowseWithPaging​

ScenarioAPI
Given that there aren't many child nodes, pagination is not a concern.Browse(...)
I'm not sure how many children there are, so just to be safe...BrowseWithPaging(...) + loop BrowseNext
Large nodes that may have thousands of child nodesBrowseWithPaging(...) Required
Once Browse Multiple nodesBrowseMany(...) (Note: This does not BrowseMany return a value at this time.ContinuationPoint)

The condition that triggers pagination is not "how many child nodes you have," but ratherHow much did the server give all at once?: SDK Each page contains a fixed maximum of 1000 references; the server may return fewer, but as long as it includes a "Next Page" indicator, ContinuationPoint it means there is another page.

Complete Template​

No need to write your own loops—they're already SDK built in. BrowseAll, Get everything in one line:

var all = ua.BrowseAll("ns=2;s=BigFolder");   // Auto-Translate to the End

Its equivalent expansion (requires controlling the page-turning pace / must be handwritten when pausing in advance):

public static List<OpcUaReference> Collect(
DarraOpcUa ua,
string nodeId,
NodeClass filter = NodeClass.Unspecified)
{
var all = new List<OpcUaReference>();
var page = ua.BrowseWithPaging(nodeId, filter);
all.AddRange(page.References);
while (page.ContinuationPoint != null)
{
page = ua.BrowseNext(page.ContinuationPoint);
all.AddRange(page.References);
}
return all;
}

BrowseAll Do two additional things compared to the above: Set an upper maxPages limit (default is 32 pages), and after finishing the page, do your best to free up the server's connection.

Next Step​