-
-
Notifications
You must be signed in to change notification settings - Fork 300
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
Introduce Cancellation Token support across all public service APIs. (Resolves #238) #476
Introduce Cancellation Token support across all public service APIs. (Resolves #238) #476
Conversation
…sing them). Only one method required an overload to be non-breaking, the others are introduced as an optional parameter
…e cancellation tokens are being leveraged
…e ShopifyService Execute methods. This has the benefit of clarifying to new services the expectation that a CancellationToken should be passed and on the caller API surface.
Nice! |
Awesome, thank you for all the work on this! I know it was a lot of tedious changes. Sorry it took so long to merge in, I'll let the tests run and get it published soon. |
thank you @pianomanjh for your contribution! |
Just a heads up, this seems to be randomly throwing both |
Yeah, that is likely a difference between the exceptions thrown by consumers of the token. We pass it into both a |
Published in 5.1.0 on nuget. Thanks for the PR and all the work you put into this one! |
ShopifyService
ExecuteXXX calls leverage a cancellation token for the underlyingHttpClient
request and the execution policy timeoutCancellationToken
I included some tests on the ShopifyService just to ensure the token is leveraged properly. I did not add tests to every single service API call, as they proxy requests to the base class, and token use there is tested. Therefore, please review the public service calls to ensure I didn't miss anything.