/// <summary> 发布 </summary> /// <param name="eventBus"></param> /// <param name="event">事件</param> /// <param name="option"></param> /// <param name="delay"></param> public static Task Publish(this IEventBus eventBus, DEvent @event, TimeSpan delay) { var key = @event.GetType().GetRouteKey(); return(eventBus.Publish(key, @event, new PublishOption { Delay = delay })); }
/// <summary> 发布 </summary> /// <param name="eventBus"></param> /// <param name="event">事件</param> /// <param name="option"></param> public static Task Publish(this IEventBus eventBus, DEvent @event, PublishOption option = null) { var key = @event.GetType().GetRouteKey(); return(eventBus.Publish(key, @event, option)); }