public virtual Pageable <Provider> GetAll(int?top = null, string expand = null, CancellationToken cancellationToken = default)
        {
            Page <Provider> FirstPageFunc(int?pageSizeHint)
            {
                using var scope = _providerClientDiagnostics.CreateScope("ProviderCollection.GetAll");
                scope.Start();
                try
                {
                    var response = _providerRestClient.List(Id.SubscriptionId, top, expand, cancellationToken: cancellationToken);
                    return(Page.FromValues(response.Value.Value.Select(value => new Provider(ArmClient, value)), response.Value.NextLink, response.GetRawResponse()));
                }
                catch (Exception e)
                {
                    scope.Failed(e);
                    throw;
                }
            }

            Page <Provider> NextPageFunc(string nextLink, int?pageSizeHint)
            {
                using var scope = _providerClientDiagnostics.CreateScope("ProviderCollection.GetAll");
                scope.Start();
                try
                {
                    var response = _providerRestClient.ListNextPage(nextLink, Id.SubscriptionId, top, expand, cancellationToken: cancellationToken);
                    return(Page.FromValues(response.Value.Value.Select(value => new Provider(ArmClient, value)), response.Value.NextLink, response.GetRawResponse()));
                }
                catch (Exception e)
                {
                    scope.Failed(e);
                    throw;
                }
            }

            return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc));
        }