[英]CancellationToken in Dropbox C# SDK?
How can I cancel Task<>
from async
methods in Dropbox C# SDK? 如何从Dropbox C#SDK中的
async
方法取消Task<>
?
I don't see how I can set CancellationToken
for them. 我看不到如何为他们设置
CancellationToken
。 I thought there is something like it in API methods: 我认为API方法中有类似的东西:
public Task<Metadata> GetMetadataAsync(
string path,
bool includeMediaInfo = false,
bool includeDeleted = false,
bool includeHasExplicitSharedMembers = false,
CancellationToken ct = null /*This is would be optional cancellation token. But this parameter doesn't exist in API*/
);
But can't find it. 但是找不到。 It would be good approach for cancel asynchronous operation.
这将是取消异步操作的好方法。
Greg's answer : 格雷格的答案 :
The Dropbox API v2 .NET SDK doesn't support cancelling/cancellation tokens, but I'll be sure to pass this along as a feature request. Dropbox API v2 .NET SDK不支持取消/取消令牌,但我将确保将其作为功能请求传递。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.