c# - OneDrive SDK Canceling Operation -
i'm using onedrive sdk
, reading doc, copy
operation can canceled.
is there work around enable cancelling
other operation download
, upload
, can find way pass cancellationtoken
those.
public async task download(string itempath) { var driveclient = await onedriveclientextensions.getauthenticatedclientusingonlineidauthenticator(new[] {"wl.signin", "onedrive.readwrite"}); var item = await driveclient.drive.root.itemwithpath(itempath).content.request().getasync(); }
cancellation operation not supported in onedrive sdk download , upload. seems sdk team working on it. can follow open issue: cancellation support? in github more information.
to support cancellation operation in uwp, can try implement own download , upload method windows.web.http.httpclient class. modern http client api windows store apps , supports cancellation , progress. more information how use class, can refer official httpclient sample.
Comments
Post a Comment