/// <summary> /// Publishes a message/event to subscribers using the <see cref="DefaultPublishMethod"/> specified globally for the <see cref="MessageBus"/> /// </summary> /// <typeparam name="TMessage">The type of message/event to publish</typeparam> /// <param name="message">The message/event to publish</param> public void Publish<TMessage>(TMessage message) { MessageDistributor<TMessage>.Publish(message, DefaultPublishMethod); }
/// <summary> /// Publishes a message/event to subscribers using the <see cref="PublishMethod"/> specified /// </summary> /// <typeparam name="TMessage">The type of message/event to publish</typeparam> /// <param name="message">The message/event to publish</param> /// <param name="method">The <see cref="PublishMethod"/> to use when publishing the message to subscribers</param> public void Publish<TMessage>(TMessage message, PublishMethod method) { MessageDistributor<TMessage>.Publish(message, method); }