void ICommandCenter.Handle <TCommand>(TCommand command) { try { _commandCenter.Handle(command); } catch (Exception e) { HandlerExceptionByMahuaCommad(e, command); } }
void ICommandCenter.Handle <TCommand>(TCommand command) { try { _commandCenter.Handle(command); } catch (TargetInvocationException ex) { Logger.ErrorException("出现异常,捕获并忽略该异常,参考信息:https://github.com/newbe36524/Newbe.Mahua.Framework/issues/52", ex); } catch (Exception e) { HandlerExceptionByMahuaCommand(e, command); } }
public void SendPrivateMessage(string toQq, string message) { _commandCenter.Handle(new SendPrivateMessageApiMahuaCommand { Message = message, ToQq = toQq }); }
public void SendLike(string toQq) { _commandCenter.Handle(new SendLikeApiMahuaCommand { ToQq = toQq, }); }