Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract API function parameters to a class for v2 #88

Merged
merged 8 commits into from
Sep 27, 2023

Conversation

jason-chan-lf
Copy link
Contributor

@jason-chan-lf jason-chan-lf commented Sep 25, 2023

  • Update code generator to move API function parameters to a separate class and update API function signature
    • In general, it is something like this
      Task<XXX> XXXAsync(XXXParameters parameters, CancellationToken cancellationToken = default(CancellationToken));
    • If there are no required parameters, then the parameters will have default value
      Task<XXX> XXXAsync(XXXParameters parameters = null, CancellationToken cancellationToken = default(CancellationToken));
  • Update foreach functions to follow the new function signature
    • In general, it is something like this
      Task ListXXXForEachAsync(Func<XXXCollectionResponse, Task<bool>> callback, ListXXXParameters parameters, int? maxPageSize = null, CancellationToken cancellationToken = default);
  • Renamed the GetSelfHostedRepositoryListAsync function to ListSelfHostedRepositoriesAsync to match the new naming conventions
  • Update integration tests
  • Add missing integration tests

@jason-chan-lf jason-chan-lf merged commit b6ef0d1 into 2.x Sep 27, 2023
6 checks passed
@jason-chan-lf jason-chan-lf deleted the extract-parameters branch September 27, 2023 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants