private void DisplayChildsFoldersAsyncBegin(TreeNode node) { var folderId = (node.Tag as FileFolder).id; var taskScheduler = TaskScheduler.FromCurrentSynchronizationContext(); var task = Task <IList <FileFolder> > .Factory.StartNew(() => DokuFlexService.GetFilesFolders(_ticket, _currentGroup.id, folderId)); task.ContinueWith(t => DisplayChildsFoldersAsyncEnd(t.Result, node), taskScheduler); task.ContinueWith(t => TaskAsyncExceptionHandle(t.Exception), new CancellationTokenSource().Token, TaskContinuationOptions.OnlyOnFaulted, taskScheduler); }