示例#1
0
        public IMessangerSubscription Subscribe <TMessage>(string key, Action <TMessage> onMessageArrived)
        {
            IMessangerSubscription subscription = new MessangerSubscription(key, ConvertToActionObject(onMessageArrived));

            CreateSubscription <TMessage>(subscription);
            return(subscription);
        }
示例#2
0
        public IMessangerSubscription Subscribe <TMessage>(Action <TMessage> onMessageArrived) where TMessage : class
        {
            IMessangerSubscription subscription = new MessangerSubscription(ConvertToActionObject(onMessageArrived));

            CreateSubscription <TMessage>(subscription);
            return(subscription);
        }