private void AsyncErrorEventHandler(object sender, ErrEventArgs e) { var logArgs = new LogMessageEventArgs { LogType = MqLogType.AsyncErrorEvent, Reason = $"An error occurred out of band --> {e.Error}" }; OnLog?.Invoke(null, logArgs); }
public void TestDefaultHandler() { // making sure there is no null pointer ConnEventArgs cea = new ConnEventArgs(null, null); DefaultClosedEventHandler().Invoke(null, cea); DefaultServerDiscoveredEventHandler().Invoke(null, cea); DefaultDisconnectedEventHandler().Invoke(null, cea); DefaultReconnectedEventHandler().Invoke(null, cea); DefaultLameDuckModeEventHandler().Invoke(null, cea); DefaultLameDuckModeEventHandler().Invoke(null, cea); DefaultClosedEventHandler().Invoke(null, null); DefaultServerDiscoveredEventHandler().Invoke(null, null); DefaultDisconnectedEventHandler().Invoke(null, null); DefaultReconnectedEventHandler().Invoke(null, null); DefaultLameDuckModeEventHandler().Invoke(null, null); DefaultLameDuckModeEventHandler().Invoke(null, null); ErrEventArgs eea = new ErrEventArgs(null, null, null); DefaultAsyncErrorEventHandler().Invoke(null, eea); DefaultAsyncErrorEventHandler().Invoke(null, null); HeartbeatAlarmEventArgs haea = new HeartbeatAlarmEventArgs(null, null, 0U, 0U); DefaultHeartbeatAlarmEventHandler().Invoke(null, haea); DefaultHeartbeatAlarmEventHandler().Invoke(null, null); UnhandledStatusEventArgs usea = new UnhandledStatusEventArgs(null, null, null); DefaultUnhandledStatusEventHandler().Invoke(null, usea); DefaultUnhandledStatusEventHandler().Invoke(null, null); FlowControlProcessedEventArgs fcpea = new FlowControlProcessedEventArgs(null, null, null, FlowControlSource.Heartbeat); DefaultFlowControlProcessedEventHandler().Invoke(null, fcpea); DefaultFlowControlProcessedEventHandler().Invoke(null, null); }
private void DeviceHeater_ErrorReceived(Accel.INamed sender, ErrEventArgs e) { logger.Debug("Heater Got an error; {0}", e.Error.ToString()); }
private void DevicePCRCycler_ErrorReceived2(Accel.INamed sender, ErrEventArgs e) { logger.Debug("PCRCycler Got an error2; {0}", e.Error.ToString()); }
/// <summary> /// For writing error related events. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Environment_OnErr(object sender, ErrEventArgs e) { Trace.WriteLine($"{e.Prefix}: {e.Message}", "Error"); }