diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 2e0527ea2c..048069c31a 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -7,6 +7,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/dotnet
# "install" the dotnet 3.1 & 5.0 runtime for tests
COPY --from=mcr.microsoft.com/dotnet/sdk:3.1 /usr/share/dotnet/shared /usr/share/dotnet/shared
COPY --from=mcr.microsoft.com/dotnet/sdk:5.0 /usr/share/dotnet/shared /usr/share/dotnet/shared
+COPY --from=mcr.microsoft.com/dotnet/sdk:6.0 /usr/share/dotnet/shared /usr/share/dotnet/shared
# # Add mkdocs for doc generation
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && apt-get -y install --no-install-recommends python3-pip
diff --git a/.github/workflows/netcore.yml b/.github/workflows/netcore.yml
index 5f924b9ed9..d7c39fdcf9 100644
--- a/.github/workflows/netcore.yml
+++ b/.github/workflows/netcore.yml
@@ -23,6 +23,10 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.*
+ - name: Setup .NET 6
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 6.0.*
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 82203bd62c..e6c84a6813 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -17,7 +17,10 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.*
-
+ - name: Setup .NET 6
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 6.0.*
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
diff --git a/.vscode/launch.json b/.vscode/launch.json
index dd7b108d27..73a4369e41 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -1,6 +1,16 @@
{
"version": "0.2.0",
"configurations": [
+ {
+ "name": "Run Generator",
+ "type": "coreclr",
+ "request": "launch",
+ "program": "${workspaceFolder}/Octokit.Generators/bin/Debug/net6.0/Octokit.Generators",
+ "args": [],
+ "cwd": "${workspaceFolder}/Octokit.Generators",
+ "console": "internalConsole",
+ "stopAtEntry": false
+ },
{
"name": "Run unit tests",
"type": "coreclr",
diff --git a/Octokit.AsyncPaginationExtension/Extensions.cs b/Octokit.AsyncPaginationExtension/Extensions.cs
index 2781ce2ea6..a9009f3b76 100644
--- a/Octokit.AsyncPaginationExtension/Extensions.cs
+++ b/Octokit.AsyncPaginationExtension/Extensions.cs
@@ -1,870 +1,822 @@
-using System;
+using System;
using System.Collections.Generic;
namespace Octokit.AsyncPaginationExtension
{
- ///
- /// Provides all extensions for pagination.
- ///
- ///
- /// The pageSize
parameter at the end of all methods allows for specifying the amount of elements to be fetched per page.
- /// Only useful to optimize the amount of API calls made.
- ///
- public static class Extensions
- {
- private const int DEFAULT_PAGE_SIZE = 30;
-
- ///
- public static IPaginatedList GetAllForRepositoryAsync(this IAssigneesClient t, string owner, string name, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(owner, name, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForRepositoryAsync(this IAssigneesClient t, long repositoryId, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(repositoryId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
-
- ///
- public static IPaginatedList GetAllAsync(this IAuthorizationsClient t, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(t.GetAll, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
-
- ///
- public static IPaginatedList GetAllAnnotationsAsync(this ICheckRunsClient t, string owner, string name, long checkRunId, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllAnnotations(owner, name, checkRunId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllAnnotationsAsync(this ICheckRunsClient t, long repositoryId, long checkRunId, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllAnnotations(repositoryId, checkRunId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
-
- ///
- public static IPaginatedList GetAllAsync(this ICommitCommentReactionsClient t, string owner, string name, int number, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAll(owner, name, number, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllAsync(this ICommitCommentReactionsClient t, long repositoryId, int number, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAll(repositoryId, number, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
-
- ///
- public static IPaginatedList GetAllAsync(this ICommitStatusClient t, string owner, string name, string reference, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAll(owner, name, reference, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllAsync(this ICommitStatusClient t, long repositoryId, string reference, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAll(repositoryId, reference, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
-
- ///
- public static IPaginatedList GetAllAsync(this IDeploymentsClient t, string owner, string name, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAll(owner, name, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllAsync(this IDeploymentsClient t, long repositoryId, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAll(repositoryId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
-
- ///
- public static IPaginatedList GetAllAsync(this IDeploymentStatusClient t, string owner, string name, int deploymentId, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAll(owner, name, deploymentId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllAsync(this IDeploymentStatusClient t, long repositoryId, int deploymentId, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAll(repositoryId, deploymentId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
-
- ///
- public static IPaginatedList GetAllAsync(this IEventsClient t, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(t.GetAll, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForRepositoryAsync(this IEventsClient t, string owner, string name, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(owner, name, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForRepositoryAsync(this IEventsClient t, long repositoryId, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(repositoryId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllIssuesForRepositoryAsync(this IEventsClient t, string owner, string name, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllIssuesForRepository(owner, name, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllIssuesForRepositoryAsync(this IEventsClient t, long repositoryId, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllIssuesForRepository(repositoryId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForRepositoryNetworkAsync(this IEventsClient t, string owner, string name, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepositoryNetwork(owner, name, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForOrganizationAsync(this IEventsClient t, string organization, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForOrganization(organization, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllUserReceivedAsync(this IEventsClient t, string user, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllUserReceived(user, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllUserReceivedPublicAsync(this IEventsClient t, string user, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllUserReceivedPublic(user, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllUserPerformedAsync(this IEventsClient t, string user, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllUserPerformed(user, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllUserPerformedPublicAsync(this IEventsClient t, string user, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllUserPerformedPublic(user, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForAnOrganizationAsync(this IEventsClient t, string user, string organization, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForAnOrganization(user, organization, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
-
- ///
- public static IPaginatedList GetAllForCurrentAsync(this IFollowersClient t, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(t.GetAllForCurrent, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllAsync(this IFollowersClient t, string login, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAll(login, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllFollowingForCurrentAsync(this IFollowersClient t, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(t.GetAllFollowingForCurrent, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllFollowingAsync(this IFollowersClient t, string login, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllFollowing(login, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
-
- ///
- public static IPaginatedList GetAllForGistAsync(this IGistCommentsClient t, string gistId, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForGist(gistId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
-
- ///
- public static IPaginatedList GetAllAsync(this IGistsClient t, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(t.GetAll, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllAsync(this IGistsClient t, DateTimeOffset since, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAll(since, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllPublicAsync(this IGistsClient t, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(t.GetAllPublic, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllPublicAsync(this IGistsClient t, DateTimeOffset since, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllPublic(since, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllStarredAsync(this IGistsClient t, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(t.GetAllStarred, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllStarredAsync(this IGistsClient t, DateTimeOffset since, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllStarred(since, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForUserAsync(this IGistsClient t, string user, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForUser(user, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForUserAsync(this IGistsClient t, string user, DateTimeOffset since, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForUser(user, since, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllCommitsAsync(this IGistsClient t, string id, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllCommits(id, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForksAsync(this IGistsClient t, string id, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForks(id, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
-
- ///
- public static IPaginatedList GetAllInstallationsForCurrentAsync(this IGitHubAppsClient t, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(t.GetAllInstallationsForCurrent, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
-
- ///
- public static IPaginatedList GetAllAsync(this IIssueCommentReactionsClient t, string owner, string name, int number, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAll(owner, name, number, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllAsync(this IIssueCommentReactionsClient t, long repositoryId, int number, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAll(repositoryId, number, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
-
- ///
- public static IPaginatedList GetAllForRepositoryAsync(this IIssueCommentsClient t, string owner, string name, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(owner, name, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForRepositoryAsync(this IIssueCommentsClient t, long repositoryId, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(repositoryId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForRepositoryAsync(this IIssueCommentsClient t, string owner, string name, IssueCommentRequest request, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(owner, name, request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForRepositoryAsync(this IIssueCommentsClient t, long repositoryId, IssueCommentRequest request, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(repositoryId, request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForIssueAsync(this IIssueCommentsClient t, string owner, string name, int number, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForIssue(owner, name, number, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForIssueAsync(this IIssueCommentsClient t, long repositoryId, int number, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForIssue(repositoryId, number, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForIssueAsync(this IIssueCommentsClient t, string owner, string name, int number, IssueCommentRequest request, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForIssue(owner, name, number, request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForIssueAsync(this IIssueCommentsClient t, long repositoryId, int number, IssueCommentRequest request, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForIssue(repositoryId, number, request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
-
- ///
- public static IPaginatedList GetAllAsync(this IIssueReactionsClient t, string owner, string name, int number, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAll(owner, name, number, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllAsync(this IIssueReactionsClient t, long repositoryId, int number, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAll(repositoryId, number, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
-
- ///
- public static IPaginatedList GetAllForCurrentAsync(this IIssuesClient t, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(t.GetAllForCurrent, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForCurrentAsync(this IIssuesClient t, IssueRequest request, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForCurrent(request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForOwnedAndMemberRepositoriesAsync(this IIssuesClient t, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(t.GetAllForOwnedAndMemberRepositories, pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForOwnedAndMemberRepositoriesAsync(this IIssuesClient t, IssueRequest request, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForOwnedAndMemberRepositories(request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForOrganizationAsync(this IIssuesClient t, string organization, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForOrganization(organization, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForOrganizationAsync(this IIssuesClient t, string organization, IssueRequest request, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForOrganization(organization, request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForRepositoryAsync(this IIssuesClient t, string owner, string name, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(owner, name, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForRepositoryAsync(this IIssuesClient t, long repositoryId, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(repositoryId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForRepositoryAsync(this IIssuesClient t, string owner, string name, RepositoryIssueRequest request, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(owner, name, request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForRepositoryAsync(this IIssuesClient t, long repositoryId, RepositoryIssueRequest request, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(repositoryId, request, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
-
- ///
- public static IPaginatedList GetAllForIssueAsync(this IIssuesEventsClient t, string owner, string name, int number, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForIssue(owner, name, number, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForIssueAsync(this IIssuesEventsClient t, long repositoryId, int number, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForIssue(repositoryId, number, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForRepositoryAsync(this IIssuesEventsClient t, string owner, string name, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(owner, name, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
- ///
- public static IPaginatedList GetAllForRepositoryAsync(this IIssuesEventsClient t, long repositoryId, int pageSize = DEFAULT_PAGE_SIZE)
- => pageSize > 0 ? new PaginatedList(options => t.GetAllForRepository(repositoryId, options), pageSize) : throw new ArgumentOutOfRangeException(nameof(pageSize), pageSize, "The page size must be positive.");
-
-
- ///
- public static IPaginatedList