Show / Hide Table of Contents

    Class EventPublisher

    Publishes the messages implementing IEvent.

    Inheritance
    object
    EventPublisher
    Implements
    IEventPublisher
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Silverback.Messaging.Publishing
    Assembly: Silverback.Core.Model.dll
    Syntax
    public class EventPublisher : IEventPublisher

    Constructors

    | Improve this doc View source

    EventPublisher(IPublisher)

    Initializes a new instance of the EventPublisher class.

    Declaration
    public EventPublisher(IPublisher publisher)
    Parameters
    Type Name Description
    IPublisher publisher

    The IPublisher to be wrapped.

    Methods

    | Improve this doc View source

    Publish(IEvent)

    Publishes the specified event to the internal bus. The message will be forwarded to its subscribers and the method will not complete until all subscribers have processed it (unless using Silverback.Integration to produce and consume the message through a message broker).

    Declaration
    public void Publish(IEvent eventMessage)
    Parameters
    Type Name Description
    IEvent eventMessage

    The event to be published.

    | Improve this doc View source

    Publish(IEvent, bool)

    Publishes the specified event to the internal bus. The message will be forwarded to its subscribers and the method will not complete until all subscribers have processed it (unless using Silverback.Integration to produce and consume the message through a message broker).

    Declaration
    public void Publish(IEvent eventMessage, bool throwIfUnhandled)
    Parameters
    Type Name Description
    IEvent eventMessage

    The event to be published.

    bool throwIfUnhandled

    A boolean value indicating whether an exception must be thrown if no subscriber is handling the message.

    | Improve this doc View source

    PublishAsync(IEvent)

    Publishes the specified event to the internal bus. The message will be forwarded to its subscribers and the Task will not complete until all subscribers have processed it (unless using Silverback.Integration to produce and consume the message through a message broker).

    Declaration
    public Task PublishAsync(IEvent eventMessage)
    Parameters
    Type Name Description
    IEvent eventMessage

    The event to be executed.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    | Improve this doc View source

    PublishAsync(IEvent, bool)

    Publishes the specified event to the internal bus. The message will be forwarded to its subscribers and the Task will not complete until all subscribers have processed it (unless using Silverback.Integration to produce and consume the message through a message broker).

    Declaration
    public Task PublishAsync(IEvent eventMessage, bool throwIfUnhandled)
    Parameters
    Type Name Description
    IEvent eventMessage

    The event to be executed.

    bool throwIfUnhandled

    A boolean value indicating whether an exception must be thrown if no subscriber is handling the message.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Implements

    IEventPublisher
    • Improve this doc
    • View source
    GitHub E-Mail
    ↑ Back to top © 2020 Sergio Aquilini