Table of Contents

Class IntegrationEventExtensions

Namespace
Savvyio.EventDriven.Messaging
Assembly
Savvyio.EventDriven.Messaging.dll

Extension methods for the IIntegrationEvent interface.

public static class IntegrationEventExtensions
Inheritance
Object
IntegrationEventExtensions

Methods

ToMessage<T>(T, Uri, String, Action<MessageOptions>)

Encloses the specified event to an instance of Message<T>.

public static IMessage<T> ToMessage<T>(this T event, Uri source, string type, Action<MessageOptions> setup = null)
    where T : IIntegrationEvent

Parameters

event T

The payload to attach within the message.

source Uri

The context that describes the origin of the message.

type String

The type that describes the type of event related to the originating occurrence.

setup Action<MessageOptions>

The MessageOptions which may be configured.

Returns

IMessage<T>

An instance of Message<T> constraint to the IIntegrationEvent interface.

Type Parameters

T

The type of the payload constraint to the IIntegrationEvent interface.

Exceptions

System.ArgumentNullException

event cannot be null - or - source cannot be null.

ArgumentException

setup failed to configure an instance of MessageOptions in a valid state.