Skip to content

Commit 0fa2f1d

Browse files
author
michael.hallett
committed
added silverlight exclusion on cancellation token async stuff
1 parent 6de983e commit 0fa2f1d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

RestSharp/RestClient.Async.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,9 @@ public virtual Task<IRestResponse<T>> ExecuteTaskAsync<T>(IRestRequest request,
290290
taskCompletionSource.TrySetCanceled();
291291
});
292292

293+
#if !SILVERLIGHT
293294
taskCompletionSource.Task.ContinueWith(t => t.Dispose(), token);
295+
#endif
294296
}
295297
catch (Exception ex)
296298
{
@@ -394,7 +396,9 @@ public virtual Task<IRestResponse> ExecuteTaskAsync(IRestRequest request, Cancel
394396
taskCompletionSource.TrySetCanceled();
395397
});
396398

399+
#if !SILVERLIGHT
397400
taskCompletionSource.Task.ContinueWith(t => t.Dispose(), token);
401+
#endif
398402
}
399403
catch (Exception ex)
400404
{

0 commit comments

Comments
 (0)