public void BeginExecute(string startingDirectory, string fileMasks) { _canceled = false; ReportProgress("Initializing..."); Thread thread = new Thread(delegate() { try { IDictionary<string, Exception> results = Execute(startingDirectory, fileMasks); _status = ParseSourceTreeStatus.CreateCompleted(results); } catch (Exception ex) { _status = ParseSourceTreeStatus.CreateError(ex); } }); thread.IsBackground = true; thread.Start(); }
private void ReportProgress(string progress) { _status = ParseSourceTreeStatus.CreateRunning(progress); }