Ejemplo n.º 1
0
 private void ConfigureDelayGenerator(IApplicationContext context)
 {
     if (DelayExpression != null)
     {
         DelayGenerator = new ExpressionEvaluatingMessageProcessor <int>(context, DelayExpression);
     }
 }
Ejemplo n.º 2
0
        private void ConfigureRoutingKeyGenerator(IApplicationContext context)
        {
            if (RoutingKeyExpression != null && RoutingKey != null)
            {
                throw new InvalidOperationException("Either a routingKey or an routingKeyExpression can be provided, but not both");
            }

            if (RoutingKeyExpression != null)
            {
                RoutingKeyGenerator = new ExpressionEvaluatingMessageProcessor <string>(context, RoutingKeyExpression);
            }
        }
Ejemplo n.º 3
0
        private void ConfigureExchangeNameGenerator(IApplicationContext context)
        {
            if (ExchangeNameExpression != null && ExchangeName != null)
            {
                throw new InvalidOperationException("Either a exchangeName or an exchangeNameExpression can be provided, but not both");
            }

            if (ExchangeNameExpression != null)
            {
                ExchangeNameGenerator = new ExpressionEvaluatingMessageProcessor <string>(context, ExchangeNameExpression);
            }
        }
Ejemplo n.º 4
0
        private void ConfigureCorrelationDataGenerator()
        {
            if (ConfirmCorrelationExpression != null)
            {
                CorrelationDataGenerator = new ExpressionEvaluatingMessageProcessor <object>(ApplicationContext, ConfirmCorrelationExpression);
            }
            else
            {
                var nullChannel = IntegrationServicesUtils.ExtractTypeIfPossible <NullChannel>(ConfirmAckChannel);
                if (!((ConfirmAckChannel == null || nullChannel != null) && ConfirmAckChannelName == null))
                {
                    throw new InvalidOperationException("A 'confirmCorrelationExpression' is required when specifying a 'confirmAckChannel'");
                }

                nullChannel = IntegrationServicesUtils.ExtractTypeIfPossible <NullChannel>(ConfirmNackChannel);
                if (!((ConfirmNackChannel == null || nullChannel != null) && ConfirmNackChannelName == null))
                {
                    throw new InvalidOperationException("A 'confirmCorrelationExpression' is required when specifying a 'confirmNackChannel'");
                }
            }
        }