Show / Hide Table of Contents

    Class EventReceiver

    Represents an endpoint that listens for events for a given event contract when started, using the MassTransit transport.

    Inheritance
    System.Object
    EventReceiver
    Implements
    IEventReceiver
    IEndpoint
    Namespace: Copper.Eventing.MassTransit.Common.V1
    Assembly: Copper.Eventing.MassTransit.Common.dll
    Syntax
    public class EventReceiver : IEventReceiver, IEndpoint

    Constructors

    View Source

    EventReceiver(IBusControlFactory, EventReceiverSettings, IDispatchMessageFormatter, IOptions<ReceiveEndpointOptions>)

    Initializes a new instance of the EventReceiver class.

    Declaration
    public EventReceiver(IBusControlFactory busControlFactory, EventReceiverSettings eventReceiverSettings, IDispatchMessageFormatter dispatchMessageFormatter, IOptions<ReceiveEndpointOptions> receiveEndpointOptions)
    Parameters
    Type Name Description
    IBusControlFactory busControlFactory

    The bus control factory.

    EventReceiverSettings eventReceiverSettings

    The event receiver settings.

    IDispatchMessageFormatter dispatchMessageFormatter

    The dispatch message formatter.

    IOptions<ReceiveEndpointOptions> receiveEndpointOptions

    The receive endpoint options.

    Methods

    View Source

    RetrieveEndpointMetadata()

    Retrieves the endpoint's metadata.

    Declaration
    public EndpointMetadata RetrieveEndpointMetadata()
    Returns
    Type Description
    EndpointMetadata

    The endpoint's metadata.

    View Source

    Start<TContract>(TContract)

    Starts the endpoint, causing it to start listening for events.

    Declaration
    public async Task<string> Start<TContract>(TContract instance)
        where TContract : class
    Parameters
    Type Name Description
    TContract instance

    The instance implementing the event contract.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.String>

    A System.Threading.Tasks.Task that represents outstanding operation. The result of the System.Threading.Tasks.Task is the endpoint System.String.

    Type Parameters
    Name Description
    TContract

    The event contract type.

    View Source

    Stop()

    Stops the endpoint, causing it to not receive any events.

    Declaration
    public async Task Stop()
    Returns
    Type Description
    System.Threading.Tasks.Task

    A System.Threading.Tasks.Task that represents outstanding operation.

    Implements

    IEventReceiver
    IEndpoint
    • View Source
    Back to top Generated by DocFX