/// <summary>
        /// Attempts to publish the message to a listener.
        /// </summary>
        /// <param name="wrapper"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        public static Task PublishAsync(this ActorReferenceWrapper wrapper, MessageWrapper message)
        {
            ISubscriberActor actor = (ISubscriberActor)wrapper.ActorReference.Bind(typeof(ISubscriberActor));

            return(actor.ReceiveMessageAsync(message));
        }
Example #2
0
 public static Dictionary <Type, Func <object, Task> > DiscoverMessageHandlers(this ISubscriberActor service)
 {
     return(DiscoverHandlers(service));
 }
Example #3
0
 public static Dictionary <Type, SubscribeAttribute> DiscoverSubscribeAttributes(this ISubscriberActor service)
 {
     return(DiscoverHandlers(service));
 }
Example #4
0
        /// <summary>
        /// Attempts to publish the message to a listener.
        /// </summary>
        /// <param name="message"></param>
        /// <returns></returns>
        public override Task PublishAsync(MessageWrapper message)
        {
            ISubscriberActor actor = (ISubscriberActor)ActorReference.Bind(typeof(ISubscriberActor));

            return(actor.ReceiveMessageAsync(message));
        }