IEnumerable <ListOpenWorkflowExecutionsResponse> IPaginator <ListOpenWorkflowExecutionsResponse> .Paginate() { if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0) { throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance."); } var nextPageToken = _request.NextPageToken; ListOpenWorkflowExecutionsResponse response; do { _request.NextPageToken = nextPageToken; response = _client.ListOpenWorkflowExecutions(_request); nextPageToken = response.WorkflowExecutionInfos.NextPageToken; yield return(response); }while (nextPageToken != null); }