示例#1
0
 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;
     }
 }
示例#2
0
 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;
     }
 }