private async void OnMiningInfoChanged()
 {
     try
     {
         await Task.Factory.StartNew(() => MiningInfoChanged?.Invoke(this, EventArgs.Empty)).ConfigureAwait(false);
     }
     catch (Exception ex)
     {
         _logger.LogError(ex, "An unhandled exception occured in a MiningInfoChanged event handler");
     }
 }
Example #2
0
        private void OnMiningInfoChanged()
        {
            var miningInfoChanged = MiningInfoChanged;

            Task.Factory.StartNew(() =>
            {
                try { MiningInfoChanged?.Invoke(this, EventArgs.Empty); }
                catch
                {
                    // Ignored
                }
            });
        }