ActorMessageDispatcherComponent.cs 457 B

123456789101112131415161718192021222324
  1. using System;
  2. using System.Collections.Generic;
  3. namespace ETModel
  4. {
  5. /// <summary>
  6. /// Actor消息分发组件
  7. /// </summary>
  8. public class ActorMessageDispatcherComponent : Component
  9. {
  10. public readonly Dictionary<Type, IMActorHandler> ActorMessageHandlers = new Dictionary<Type, IMActorHandler>();
  11. public override void Dispose()
  12. {
  13. if (this.IsDisposed)
  14. {
  15. return;
  16. }
  17. base.Dispose();
  18. this.ActorMessageHandlers.Clear();
  19. }
  20. }
  21. }