private void TimerTick(object sender, EventArgs e) { timer.Stop(); Task.Factory.StartNew(text => documentParser.Parse(text.ToString()), Document.Text) .ContinueWith(s => { if (s.IsFaulted) { Log.Error(s.Exception); return; } var result = s.Result; if (SiteContext != null) { result = SiteContext.ConvertToAbsolutePaths(result); } Render = result; UpdateWordCount(); }, TaskScheduler.FromCurrentSynchronizationContext()); }