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