msgraph-sdk-dotnet icon indicating copy to clipboard operation
msgraph-sdk-dotnet copied to clipboard

Add overloads with only CancellationToken

Open khellang opened this issue 1 year ago • 0 comments

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.

khellang avatar Mar 17 '23 23:03 khellang