public static ILinkPulledMessage <object> ConstructPulledMessage(
            Type bodyType,
            LinkPulledMessage <byte[]> message,
            object body,
            LinkMessageProperties properties
            )
        {
            var genericType = LinkPulledMessageType.MakeGenericType(bodyType);

            return((ILinkPulledMessage <object>)Activator
                   .CreateInstance(genericType, message, body, properties));
        }
Beispiel #2
0
 public LinkPulledMessage(
     LinkPulledMessage <byte[]> message,
     TBody body,
     LinkMessageProperties properties
     ) : base(
         body,
         properties,
         message.ReceiveProperties,
         message.Cancellation
         )
 {
     Ack       = message.Ack;
     Nack      = message.Nack;
     Requeue   = message.Requeue;
     Exception = message.Exception;
 }