using System; namespace Unity.BossRoom.Infrastructure { public interface IPublisher { void Publish(T message); } public interface ISubscriber { IDisposable Subscribe(Action handler); void Unsubscribe(Action handler); } public interface IMessageChannel : IPublisher, ISubscriber, IDisposable { bool IsDisposed { get; } } public interface IBufferedMessageChannel : IMessageChannel { bool HasBufferedMessage { get; } T BufferedMessage { get; } } }