microsoftgraph / microsoftgraph/msgraph-sdk-dotnet

Add overloads with only CancellationToken

Open
#1,740 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

generated Request: enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.