12345678910111213141516 |
- namespace Bmp.Core.Common.EventBus;
- public interface IEventBus
- {
- bool Subscript<T>(Action<T> callBack);
- bool UnSubscript<T>(Action<T> callBack);
- bool Publish<T>();
- bool Publish<T>(T obj);
- bool Subscript<TA, TT>(Func<TT> callBack) => Subscript<TA>(_ => Publish(callBack()));
- bool Subscript<TA, TT>(Func<TA, TT> callBack) => Subscript<TA>(a => Publish(callBack(a)));
- }
|