A Microsoft platform for building and publishing apps for Windows devices.
Hello,
Welcome to Microsoft Q&A,
I want to Close the PairAsync operation after 20 seconds if it not completed. I don't know how to do this.
You could call AsTask extension method then pass 20s CancellationToken for PairAsync AsyncOperation method like the following.
var source = new CancellationTokenSource(TimeSpan.FromSeconds(20));
var res = await PairAsync().AsTask(source.Token);
Thanks
Nico Zhu