我正在尝试走出网关,获取数据然后返回 UI 线程。ContinueWith 运行,但网关从不运行?
ILogonResult result;
Task.Factory
.StartNew(() =>
{
result = Gateway.Authenticate(a, b);
})
.ContinueWith(task =>
{
TaskScheduler.FromCurrentSynchronizationContext();
DoSomeUI(result);
}
);