/// <summary>
 /// This method clones a message and then changes its destination information to match the parameters passed.
 /// </summary>
 /// <param name="message">The original message.</param>
 /// <param name="channelId">The delivery channelId</param>
 /// <param name="messageType">The message channelId</param>
 /// <param name="actionType">The message action channelId</param>
 /// <param name="priority">This is the optional priority. If this is set to a value it will replace the original priority.</param>
 /// <returns>The cloned message with the alternative destination information.</returns>
 public static ServiceMessage Forward(this ServiceMessage message, string channelId, string messageType, string actionType, int?priority = null)
 {
     return(message.Clone().SetDestination(channelId, messageType, actionType, priority));
 }
 /// <summary>
 /// This method clones a message and then changes its destination information to match the contract.
 /// </summary>
 /// <typeparam name="C">The contract type.</typeparam>
 /// <param name="message">The message to forward.</param>
 /// <param name="priority">This is the optional priority. If this is set to a value it will replace the original priority.</param>
 /// <returns>The cloned message with the alternative destination information.</returns>
 public static ServiceMessage Forward <C>(this ServiceMessage message, int?priority = null)
     where C : IMessageContract
 {
     return(message.Clone().SetDestination <C>(priority));
 }