Example #1
0
            public Task <T> Start(IViewController feedBackView)
            {
                var task = Task.Factory.StartNew(taskFunc);

                task.ContinueWith(t =>
                {
                    Logger.Default.Log(t.Exception);
                    feedBackView.CloseView();
                }, TaskContinuationOptions.OnlyOnFaulted);

                task.ContinueWith(t =>
                {
                    feedBackView.CloseView();
                    return(t.Result);
                }, TaskContinuationOptions.NotOnFaulted);

                return(task);
            }