MailboxDispatcherComponent.cs 487 B

1234567891011121314151617181920212223
  1. using System.Collections.Generic;
  2. namespace ETModel
  3. {
  4. /// <summary>
  5. /// mailbox分发组件,不同类型的mailbox交给不同的MailboxHandle处理
  6. /// </summary>
  7. public class MailboxDispatcherComponent : Component
  8. {
  9. public readonly Dictionary<string, IMailboxHandler> MailboxHandlers = new Dictionary<string, IMailboxHandler>();
  10. public override void Dispose()
  11. {
  12. if (this.IsDisposed)
  13. {
  14. return;
  15. }
  16. base.Dispose();
  17. this.MailboxHandlers.Clear();
  18. }
  19. }
  20. }