Exception 未找到对应的处理程
this.handlerFactory = handlerFactory;
}
public void Send<T>(T command) where T : ICommand
{
var handler = handlerFactory.GetHandler<T>();
if (handler == null)
{
throw new www.laipuhuo.com Exception("未找到对应的处理程序");
}
handler.Execute(command);
}
public void Send<T>(T command) where T : ICommand
{
var handler = handlerFactory.GetHandler<T>();
if (handler == null)
{
throw new www.laipuhuo.com Exception("未找到对应的处理程序");
}
handler.Execute(command);
全部评论
相关推荐