private async Task LoadTraceRecordsAsync(IEnumerable <string> files) { if (!this.IsControlsEnabled) { return; } ConnectionData connectionData = GetSelectedConnection(); ToggleControls(connectionData, false, Properties.OutputStrings.LoadingTraceFiles); this.Dispatcher.Invoke(() => { this._itemsSource.Clear(); tabControl.SelectedItem = tbITraces; }); var taskFiles = TraceRecord.ParseFilesAsync(files); try { var service = await GetService(); if (service != null) { if (!_systemUserCache.ContainsKey(service.ConnectionData.ConnectionId)) { var repository = new SystemUserRepository(service); var list = await repository.GetListAsync(null, new ColumnSet(SystemUser.Schema.EntityPrimaryIdAttribute, SystemUser.Schema.Attributes.fullname)); _systemUserCache.Add(service.ConnectionData.ConnectionId, list.ToDictionary(e => e.Id)); } } } catch (Exception ex) { this._iWriteToOutput.WriteErrorToOutput(connectionData, ex); } _loadedRecords = await taskFiles; ToggleControls(connectionData, true, Properties.OutputStrings.LoadingTraceFilesCompletedFormat1, _loadedRecords.Count()); await FilterExistingTraceRecords(); }