Exemplo n.º 1
0
 public async Task DeliverMessageAsync(MessageWrapper messageWrapper, IProxyFactories proxyFactories)
 {
     await SubscriptionDetails.ServiceOrActorReference.PublishAsync(messageWrapper, proxyFactories);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Convert the provided <paramref name="messageWrapper"/> into an object of type <typeparamref name="TResult"/>
        /// </summary>
        /// <param name="messageWrapper"></param>
        /// <returns></returns>
        public static TResult CreateMessage <TResult>(this MessageWrapper messageWrapper)
        {
            var message = (PayloadSerializer ?? new DefaultPayloadSerializer()).Deserialize <TResult>(messageWrapper.Payload);

            return(message);
        }
 /// <summary>
 /// Attempts to publish the message to a listener.
 /// </summary>
 /// <param name="message"></param>
 /// <returns></returns>
 public abstract Task PublishAsync(MessageWrapper message);
 /// <summary>
 /// Attempts to publish the message to a listener.
 /// </summary>
 /// <param name="message"></param>
 /// <returns></returns>
 public abstract Task PublishAsync(MessageWrapper message, IProxyFactories proxyFactories);