private void RefreshStatus() { var stats = ET.GetStats(); var numberOfExceptionsInQueue = stats.NumberOfExceptionsInQueue; var numberOfExceptionsSent = stats.NumberOfExceptionsSent; var numberOfExceptionsInSendQueue = stats.NumberOfExceptionsInSendQueue; if (label1.InvokeRequired) { label1.Invoke(new Action(() => label1.Text = string.Format( "Exceptions in local queue: {0}. Exceptions sent {1}. Exceptions in send queue {2}", numberOfExceptionsInQueue, numberOfExceptionsSent, numberOfExceptionsInSendQueue) )); } else { label1.Text = string.Format("Exceptions in queue: {0}. Exceptions sent {1}", numberOfExceptionsInQueue, numberOfExceptionsSent); } }
private void BtnSendGazillionClick(object sender, RoutedEventArgs e) { Exception exception = null; try { RandomException(); } catch (Exception oops) { exception = oops; } ET.Publish(exception); var etStats = ET.GetStats(); textBlock1.Text = etStats.NumberOfExceptionsInQueue + " " + etStats.NumberOfExceptionsInSendQueue + " " + etStats.NumberOfExceptionsSent; var etExceptions = ET.GetExceptions(); ET.SendExceptions(etExceptions); }