public void SetTabMarks(ParseErrors errors, Cache <string, IDataSet> loadedDataSets) { _lastLoadedDataSets = loadedDataSets; var tabMarkInfos = new Cache <string, TabMarkInfo>(onMissingKey: _ => new TabMarkInfo(errorMessage: null, isLoaded: false)); foreach (var loadedDataSet in loadedDataSets.KeyValues) { var errorsForDataSet = errors.ErrorsFor(loadedDataSet.Value); var errorMessage = errorsForDataSet.Any() ? Error.ParseErrorMessage(errorsForDataSet.Select(x => x.Message)) : null; var info = new TabMarkInfo(errorMessage: errorMessage, isLoaded: true); tabMarkInfos.Add(loadedDataSet.Key, info); } View.SetTabMarks(tabMarkInfos); }