| | |
| | | } |
| | | |
| | | #region ILogoutput |
| | | public Action<LogMsg> OnLogMsgOutput { get; set; } |
| | | public event Action<LogMsg> OnLogMsgOutput; |
| | | |
| | | public void LogDisplay(LogMsg msg) |
| | | { |
| | |
| | | { |
| | | OnLogMsgOutput?.Invoke(new LogMsg(DateTime.Now, $"{_methodCode}调用开始", "")); |
| | | |
| | | ProcessResponse response = _method.Invoke(Process, new object[] { opConfig, _invokeDevice, _sourceDevice }) as ProcessResponse; |
| | | |
| | | if (response != null) |
| | | try |
| | | { |
| | | OnLogMsgOutput?.Invoke(new LogMsg(DateTime.Now, $"{_methodCode}调用完成", $"反馈:{JsonConvert.SerializeObject(response)}")); |
| | | ProcessResponse response = _method.Invoke(Process, new object[] { opConfig, _invokeDevice, _sourceDevice }) as ProcessResponse; |
| | | |
| | | if (response != null) |
| | | { |
| | | OnLogMsgOutput?.Invoke(new LogMsg(DateTime.Now, $"{_methodCode}调用完成", $"反馈:{JsonConvert.SerializeObject(response)}")); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | OnLogMsgOutput?.Invoke(new LogMsg(DateTime.Now, $"{_methodCode}调用异常", ex.GetExceptionMessage())); |
| | | } |
| | | }); |
| | | } |