1234567891011121314151617 |
- namespace WarcViewerBlazorWinForm.Library.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)));
- }
- }
|