public virtual Pageable <SyncFullSchemaProperties> GetMemberSchemas(CancellationToken cancellationToken = default) { Page <SyncFullSchemaProperties> FirstPageFunc(int?pageSizeHint) { using var scope = _syncMemberClientDiagnostics.CreateScope("SyncMemberResource.GetMemberSchemas"); scope.Start(); try { var response = _syncMemberRestClient.ListMemberSchemas(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <SyncFullSchemaProperties> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _syncMemberClientDiagnostics.CreateScope("SyncMemberResource.GetMemberSchemas"); scope.Start(); try { var response = _syncMemberRestClient.ListMemberSchemasNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }