Show / Hide Table of Contents

    Class QueryPublisher

    Publishes the messages implementing IQuery<TResult>.

    Inheritance
    object
    QueryPublisher
    Implements
    IQueryPublisher
    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 QueryPublisher : IQueryPublisher

    Constructors

    | Improve this doc View source

    QueryPublisher(IPublisher)

    Initializes a new instance of the QueryPublisher class.

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

    The IPublisher to be wrapped.

    Methods

    | Improve this doc View source

    ExecuteAsync<TResult>(IQuery<TResult>)

    Executes the specified query publishing it 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<TResult> ExecuteAsync<TResult>(IQuery<TResult> queryMessage)
    Parameters
    Type Name Description
    IQuery<TResult> queryMessage

    The query to be executed.

    Returns
    Type Description
    Task<TResult>

    A Task<TResult> representing the asynchronous operation. The task result contains the query result.

    Type Parameters
    Name Description
    TResult

    The type of the expected query result.

    | Improve this doc View source

    ExecuteAsync<TResult>(IQuery<TResult>, bool)

    Executes the specified query publishing it 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<TResult> ExecuteAsync<TResult>(IQuery<TResult> queryMessage, bool throwIfUnhandled)
    Parameters
    Type Name Description
    IQuery<TResult> queryMessage

    The query 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<TResult>

    A Task<TResult> representing the asynchronous operation. The task result contains the query result.

    Type Parameters
    Name Description
    TResult

    The type of the expected query result.

    | Improve this doc View source

    Execute<TResult>(IQuery<TResult>)

    Executes the specified query publishing it 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 TResult Execute<TResult>(IQuery<TResult> queryMessage)
    Parameters
    Type Name Description
    IQuery<TResult> queryMessage

    The query to be executed.

    Returns
    Type Description
    TResult

    The query result.

    Type Parameters
    Name Description
    TResult

    The type of the expected query result.

    | Improve this doc View source

    Execute<TResult>(IQuery<TResult>, bool)

    Executes the specified query publishing it 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 TResult Execute<TResult>(IQuery<TResult> queryMessage, bool throwIfUnhandled)
    Parameters
    Type Name Description
    IQuery<TResult> queryMessage

    The query 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
    TResult

    The query result.

    Type Parameters
    Name Description
    TResult

    The type of the expected query result.

    Implements

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