Exemple #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);
        }
Exemple #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);
        }
 public MessagingMessageConverterAdapter(MessagingMessageListenerAdapter adapter, object instance, MethodInfo method, bool batch, ILogger logger = null)
 {
     _logger              = logger;
     _adapter             = adapter;
     Instance             = instance;
     Method               = method;
     IsBatch              = batch;
     InferredArgumentType = DetermineInferredType();
     if (InferredArgumentType != null)
     {
         _logger?.LogDebug("Inferred argument type for " + method.ToString() + " is " + InferredArgumentType);
     }
 }