예제 #1
0
        public bool Subscribe <TData, TReplyData>(Func <BusMessage <TData>, BusMessage <TReplyData> > callback, bool hierarchy = false, IEnumerable <BusHeader> filter = null)
        {
            BusMessageCallHandler <TData, TReplyData> handler = new BusMessageCallHandler <TData, TReplyData>(callback);

            return(_helper.Subscribe(typeof(TData), handler, hierarchy, filter));
        }
예제 #2
0
        public bool Subscribe <TData>(Action <BusMessage <TData> > callback, bool hierarchy, IEnumerable <BusHeader> filter)
        {
            BusMessageCallHandler <TData> handler = new BusMessageCallHandler <TData>(callback);

            return(_helper.Subscribe(typeof(TData), handler, hierarchy, filter));
        }