private void ConfigureDelayGenerator(IApplicationContext context) { if (DelayExpression != null) { DelayGenerator = new ExpressionEvaluatingMessageProcessor <int>(context, DelayExpression); } }
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); } }
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); } }
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'"); } } }