예제 #1
0
        /// <summary>
        /// Enumerate all public repositories on BitBucket, doing requests page by page.
        /// </summary>m>
        /// <param name="parameters">Parameters for the queries.</param>
        /// <param name="token">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
        public IAsyncEnumerable <Repository> EnumeratePublicRepositoriesAsync(EnumeratePublicRepositoriesParameters parameters, CancellationToken token = default)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException(nameof(parameters));
            }

            return(_sharpBucketV2.EnumeratePaginatedValuesAsync <Repository>(_baseUrl, parameters.ToDictionary(), parameters.PageLen, token));
        }
예제 #2
0
        /// <summary>
        /// Enumerate all public repositories on Bitbucket.
        /// </summary>
        /// <param name="parameters">Parameters for the queries.</param>
        public IEnumerable <Repository> EnumeratePublicRepositories(EnumeratePublicRepositoriesParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException(nameof(parameters));
            }

            return(_sharpBucketV2.EnumeratePaginatedValues <Repository>(_baseUrl, parameters.ToDictionary(), parameters.PageLen));
        }