private void AsyncListarAgendaCancelada() { List <string> _list = new List <string>(); _list.Add("3"); Task.Factory.StartNew(() => mdata.AgendaCancelada(_list)) .ContinueWith(task => { if (task.IsCompleted) { ListarAgenda = task.Result; } }); }
private void AsyncListarAgendaCancelada() { List <string> _list = new List <string>(); _list.Add("3"); Task.Factory.StartNew(() => mdata.AgendaCancelada(_list)) .ContinueWith(task => { if (task.IsCompleted) { ListarAgenda = task.Result; } }, System.Threading.CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()); }