Class MessageExtensions
Extension methods for the IMessage<T> interface.
public static class MessageExtensions
- Inheritance
-
objectMessageExtensions
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
messageIMessage<T>The IMessage<T> to clone.
copierFunc<IMessage<T>>The function delegate that is used to clone the specified
message. Default isnull.
Returns
- IMessage<T>
An implementation of IMessage<T> that is an otherwise clone of the specified
message.
Type Parameters
TThe type of the payload constraint to the IRequest interface.
Exceptions
- ArgumentNullException
messagecannot be null.