public IMessangerSubscription Subscribe <TMessage>(string key, Action <TMessage> onMessageArrived) { IMessangerSubscription subscription = new MessangerSubscription(key, ConvertToActionObject(onMessageArrived)); CreateSubscription <TMessage>(subscription); return(subscription); }
public IMessangerSubscription Subscribe <TMessage>(Action <TMessage> onMessageArrived) where TMessage : class { IMessangerSubscription subscription = new MessangerSubscription(ConvertToActionObject(onMessageArrived)); CreateSubscription <TMessage>(subscription); return(subscription); }