C2S_SubscribeLogHandler.cs 430 B

12345678910111213141516171819
  1. using System;
  2. using Base;
  3. using Model;
  4. namespace Controller
  5. {
  6. [MessageHandler(AppType.Realm)]
  7. public class C2S_SubscribeLogHandler : AMRpcEvent<C2S_SubscribeLog, S2C_SubscribeLog>
  8. {
  9. protected override void Run(Entity entity, C2S_SubscribeLog message, Action<S2C_SubscribeLog> reply)
  10. {
  11. Log.Info(MongoHelper.ToJson(message));
  12. entity.AddComponent<LogToClientComponent>();
  13. reply(new S2C_SubscribeLog());
  14. }
  15. }
  16. }