IMessagePathSet.cs 450 B

12345678910111213141516
  1. using System;
  2. using System.Collections.Generic;
  3. namespace NTMiner.Router {
  4. public interface IMessagePathSet {
  5. IEnumerable<IMessagePathId> GetAllPaths();
  6. void Route<TMessage>(TMessage message) where TMessage : IMessage;
  7. void Add<TMessage>(MessagePath<TMessage> handler);
  8. void Remove(IMessagePathId handlerId);
  9. event Action<IMessagePathId> Added;
  10. event Action<IMessagePathId> Removed;
  11. }
  12. }