public static async Task RefreshBindingsAsync(this IUIView view, IEventAggregator aggregator) { if (aggregator.HandlerExistsFor(typeof(IUIView), action: EnumActionCategory.Async) == false) { throw new BasicBlankException("No Event Handler For Refresh The Bindings. Rethink"); } await aggregator.PublishAsync(view); }
public static async Task SendLoadAsync(this IEventAggregator thisE) { if (thisE.HandlerExistsFor(typeof(LoadEventModel), action: EnumActionCategory.Async) == false) { throw new BasicBlankException("No Event Handler For Loading Async. Rethink"); } await thisE.PublishAsync(new LoadEventModel()); }
public bool HandlerExistsFor(Type messageType) { return(eventAggregator.HandlerExistsFor(messageType)); }