Table of Contents

Class MessageExtensions

Namespace
Savvyio.Messaging
Assembly
Savvyio.Messaging.dll

Extension methods for the IMessage<T> interface.

public static class MessageExtensions
Inheritance
Object
MessageExtensions

Methods

Clone<T>(IMessage<T>, Func<IMessage<T>>)

Clones the specified message using either the specified copier or the default implementation that return a new instance of Message<T>.

public static IMessage<T> Clone<T>(this IMessage<T> message, Func<IMessage<T>> copier = null)
    where T : IRequest

Parameters

message IMessage<T>

The IMessage<T> to clone.

copier Func<IMessage<T>>

The function delegate that is used to clone the specified message. Default is null.

Returns

IMessage<T>

An implementation of IMessage<T> that is an otherwise clone of the specified message.

Type Parameters

T

The type of the payload constraint to the IRequest interface.

Exceptions

System.ArgumentNullException

message cannot be null.