示例#1
0
        protected MessagingMessageListenerAdapter CreateInstance(MethodInfo m, bool returnExceptions)
        {
            var adapter = new MessagingMessageListenerAdapter(null, null, m, returnExceptions, null)
            {
                HandlerAdapter = new HandlerAdapter(factory.CreateInvocableHandlerMethod(sample, m))
            };

            return(adapter);
        }
示例#2
0
        protected MessagingMessageListenerAdapter CreateMultiInstance(MethodInfo m1, MethodInfo m2, bool returnExceptions)
        {
            var adapter = new MessagingMessageListenerAdapter(null, null, null, returnExceptions, null);
            var methods = new List <IInvocableHandlerMethod>
            {
                factory.CreateInvocableHandlerMethod(sample, m1),
                factory.CreateInvocableHandlerMethod(sample, m2)
            };
            var handler = new DelegatingInvocableHandler(methods, sample, null, null);

            adapter.HandlerAdapter = new HandlerAdapter(handler);
            return(adapter);
        }