microsoftgraph / microsoftgraph/msgraph-sdk-dotnet
Add overloads with only CancellationToken
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 789
- Forks
- 264
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 3
Description
In v4 versions, the following code worked:
await Client.Groups[groupId].Request().GetAsync(cancellationToken);
In v5, you now have to name the argument if you're only passing a CancellationToken, which ends up being longer than the old code including the Request method call:
await Client.Groups[groupId].GetAsync(cancellationToken: cancellationToken);
I suspect it's pretty common to pass cancellation tokens, but don't want to necessarily customize the request.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the v5 GetAsync entry point shown in the issue and compare it with the v4 Request().GetAsync usage. Locate the overload definitions for Client.Groups[groupId].GetAsync and determine how overloads accepting only CancellationToken are represented. Done means the positional call compiles without naming the cancellationToken argument and existing request customization remains available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100