void ICommandCenter.Handle <TCommand>(TCommand command)
 {
     try
     {
         _commandCenter.Handle(command);
     }
     catch (Exception e)
     {
         HandlerExceptionByMahuaCommad(e, command);
     }
 }
示例#2
0
 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);
     }
 }
示例#3
0
 public void SendPrivateMessage(string toQq, string message)
 {
     _commandCenter.Handle(new SendPrivateMessageApiMahuaCommand
     {
         Message = message,
         ToQq    = toQq
     });
 }
示例#4
0
 public void SendLike(string toQq)
 {
     _commandCenter.Handle(new SendLikeApiMahuaCommand
     {
         ToQq = toQq,
     });
 }