in teamcity-rest-client-impl/src/main/kotlin/org/jetbrains/teamcity/rest/coroutines/implementation.kt [722:733]
override fun all(): Flow<Investigation> {
val locator = getLocator()
val flow = lazyPagingFlow(instance,
getFirstBean = { instance.service.investigations(locator) },
convertToPage = { investigationsBean ->
Page(
data = investigationsBean.investigation.map { InvestigationImpl(it, true, instance) },
nextHref = investigationsBean.nextHref
)
})
return limitResults?.let(flow::take) ?: flow
}