private static void RabbitMQ_MessageArrived(object sender, MsgCategoryEnum e) { switch (e) { case (MsgCategoryEnum.CommandUpdate): eventAggregator.GetEvent<CacheCommand>().Publish((MsgDispatchCommand)sender); break; case (MsgCategoryEnum.CommandApprove): eventAggregator.GetEvent<ApproveCommand>().Publish((MsgDispatchCommand)sender); break; case (MsgCategoryEnum.CommandTransmit): eventAggregator.GetEvent<TransmitCommand>().Publish((MsgDispatchCommand)sender); break; case (MsgCategoryEnum.CommandSign): eventAggregator.GetEvent<SignCommand>().Publish((MsgCommandSign)sender); break; case (MsgCategoryEnum.CommandAgentSign): eventAggregator.GetEvent<AgentSignCommand>().Publish((MsgCommandSign)sender); break; case (MsgCategoryEnum.CommandCheck): eventAggregator.GetEvent<CheckSpeedCommand>().Publish((MsgSpeedCommand)sender); break; case (MsgCategoryEnum.SpeedCache): eventAggregator.GetEvent<CacheSpeedCommand>().Publish((MsgSpeedCommand)sender); break; case (MsgCategoryEnum.CommandActive): eventAggregator.GetEvent<ActiveSpeedCommand>().Publish((MsgSpeedCommand)sender); break; case (MsgCategoryEnum.CommandExecute): eventAggregator.GetEvent<ExecuteSpeedCommand>().Publish((MsgSpeedCommand)sender); break; default: break; } }
private static void RabbitMQ_MessageArrived(object sender, MsgCategoryEnum e) { switch (e) { case (MsgCategoryEnum.CommandTransmit): eventAggregator.GetEvent<NewCommand>().Publish((MsgDispatchCommand)sender); break; case (MsgCategoryEnum.CommandAgentSign): eventAggregator.GetEvent<AgentSignCommand>().Publish((MsgCommandSign)sender); break; case (MsgCategoryEnum.TrainTimeReport): eventAggregator.GetEvent<NewReportNet>().Publish((MsgTrainTimeReport)sender); break; default: break; } }