Beispiel #1
0
        public IEnumerable <ValidationResult> Validate()
        {
            foreach (var result in _routingSlipConfigurator.Validate())
            {
                yield return(result);
            }
            foreach (var result in _activityPipeConfigurator.Validate())
            {
                yield return(result);
            }

            _configurationObservers.All(observer =>
            {
                if (_compensateAddress == null)
                {
                    observer.ExecuteActivityConfigured(this);
                }
                else
                {
                    observer.ActivityConfigured(this, _compensateAddress);
                }

                return(true);
            });
        }
        /// <summary>
        /// Validate the pipe configuration, throwing an exception if any failures are encountered.
        /// </summary>
        /// <param name="configurator"></param>
        /// <typeparam name="T"></typeparam>
        /// <exception cref="PipeConfigurationException"></exception>
        public static void ValidatePipeConfiguration <T>(this IBuildPipeConfigurator <T> configurator)
            where T : class, PipeContext
        {
            IPipeConfigurationResult result = new PipeConfigurationResult(configurator.Validate());

            if (result.ContainsFailure)
            {
                throw new PipeConfigurationException(result.GetMessage("The pipe configuration was invalid"));
            }
        }
Beispiel #3
0
        public IEnumerable <ValidationResult> Validate()
        {
            var specification = this as IConsumerMessageConfigurator <TConsumer, TMessage>;

            _observers.All(observer =>
            {
                observer.ConsumerMessageConfigured(specification);
                return(true);
            });

            return(_batchConfigurator.Validate()
                   .Concat(_batchMessagePipeConfigurator.Validate())
                   .Concat(_consumerSpecification.Validate()));
        }
Beispiel #4
0
        public IEnumerable <ValidationResult> Validate()
        {
            foreach (var result in _routingSlipConfigurator.Validate())
            {
                yield return(result);
            }
            foreach (var result in _activityPipeConfigurator.Validate())
            {
                yield return(result);
            }

            _configurationObservers.All(observer =>
            {
                observer.CompensateActivityConfigured(this);
                return(true);
            });
        }
Beispiel #5
0
        public IEnumerable <ValidationResult> Validate()
        {
            foreach (var result in _specifications.SelectMany(x => x.Validate()))
            {
                yield return(result);
            }

            foreach (var result in _consumePipeConfigurator.Validate())
            {
                yield return(result);
            }

            foreach (var result in _messageSpecifications.Values.SelectMany(x => x.Validate()))
            {
                yield return(result);
            }
        }
Beispiel #6
0
 public IEnumerable <ValidationResult> Validate()
 {
     return(_specifications.SelectMany(x => x.Validate())
            .Concat(_consumePipeConfigurator.Validate())
            .Concat(_messageSpecifications.Values.SelectMany(x => x.Validate())));
 }
 public IEnumerable <ValidationResult> Validate()
 {
     return(_configurator.Validate());
 }
 public IEnumerable <ValidationResult> Validate()
 {
     return(_configurator.Validate()
            .Concat(DeadLetterConfigurator.Validate())
            .Concat(ErrorConfigurator.Validate()));
 }
 public IEnumerable <ValidationResult> Validate()
 {
     return(_handlerConfigurator.Validate().Concat(_pipeConfigurator.Validate()));
 }
Beispiel #10
0
 public IEnumerable <ValidationResult> Validate()
 {
     return(_configurator.Validate()
            .Concat(_deadLetterPipeConfigurator.Validate())
            .Concat(_errorPipeConfigurator.Validate()));
 }