public async void GetSampleDataAsync(ADOTabularConnection connection, int sampleSize) { UpdatingSampleData = true; try { await Task.Run(() => { using (var newConn = connection.Clone()) { SampleData = _column.GetSampleData(newConn, sampleSize); } }); } catch (Exception ex) { await _eventAggregator.PublishOnUIThreadAsync(new OutputMessage(MessageType.Warning, $"Error populating tooltip sample data: {ex.Message}")); } finally { UpdatingSampleData = false; } }
public async void UpdateBasicStatsAsync(ADOTabularConnection connection) { UpdatingBasicStats = true; try { await Task.Run(() => { using (var newConn = connection.Clone()) { _column.UpdateBasicStats(newConn); MinValue = _column.MinValue; MaxValue = _column.MaxValue; DistinctValues = _column.DistinctValues; } }); } catch (Exception ex) { await _eventAggregator.PublishOnUIThreadAsync(new OutputMessage(MessageType.Warning, $"Error populating tooltip basic statistics data: {ex.Message}")); } finally { UpdatingBasicStats = false; } }
public async void GetSampleDataAsync(ADOTabularConnection connection, int sampleSize) { UpdatingSampleData = true; try { await Task.Run(() => { using (var newConn = connection.Clone()) { SampleData = _column.GetSampleData(newConn, sampleSize); } }); } catch (Exception ex) { var errorMsg = $"Error populating tooltip sample data: {ex.Message}"; Log.Warning(Common.Constants.LogMessageTemplate, nameof(TreeViewColumn), nameof(GetSampleDataAsync), errorMsg); await _eventAggregator.PublishOnUIThreadAsync(new OutputMessage(MessageType.Warning, errorMsg)); } finally { UpdatingSampleData = false; } }