Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Update docs for PageIterator: missing await for pageIterator.iterate() and pageIterator.resume() #524

Copy link
Copy link
@jstott

Description

@jstott
Issue body actions

Sample code for the PageIterator Iterate over all the messages and Stopping and Resuming the iteration is missing await for pageIterator.iterate()

Current iterate-over-all-the-messages

// This iterates the collection until the nextLink is drained out.
pageIterator.iterate();

Should be:

// This iterates the collection until the nextLink is drained out.
await pageIterator.iterate();

Current stopping-and-resuming-the-iteration

// This stops iterating over for 1000 entities.
pageIterator.iterate();

// Resuming will do start from where it left off and iterate for next 1000 entities.
// Check and resume is likely to be called in any user interaction requiring to load more data.
if (!pageIterator.isComplete()) {
	pageIterator.resume();
}

Should be:

// This stops iterating over for 1000 entities.
await pageIterator.iterate();

// Resuming will do start from where it left off and iterate for next 1000 entities.
// Check and resume is likely to be called in any user interaction requiring to load more data.
if (!pageIterator.isComplete()) {
	await pageIterator.resume();
}
Reactions are currently unavailable

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.