I have a task that does the hard work. I need to pass the result to LogContent
Task<Tuple<SupportedComunicationFormats, List<Tuple<TimeSpan, string>>>>.Factory .StartNew(() => DoWork(dlg.FileName)) .ContinueWith(obj => LogContent = obj.Result);
This property:
public Tuple<SupportedComunicationFormats, List<Tuple<TimeSpan, string>>> LogContent { get { return _logContent; } private set { _logContent = value; if (_logContent != null) { string entry = string.Format("Recognized {0} log file",_logContent.Item1); _traceEntryQueue.AddEntry(Origin.Internal, entry); } } }
The problem is that _traceEntryQueue is data bound to the UI, and due to the reason I will have an exception from code like this.
So my question is how to make it work correctly?
Night walker
source share