public IEnumerable <ValidationResult> Validate()
 {
     return(_consumerSpecification.Validate()
            .Concat(_cancelJobSpecification.Validate())
            .Concat(_startJobSpecification.Validate())
            .Concat(_submitJobSpecification.Validate()));
 }
        public IEnumerable <ValidationResult> Validate()
        {
            if (_consumerFactory == null)
            {
                yield return(this.Failure("The consumer factory cannot be null."));
            }

            if (!typeof(TConsumer).HasInterface <IConsumer>())
            {
                yield return(this.Warning($"The consumer class {TypeMetadataCache<TConsumer>.ShortName} does not implement any IMessageConsumer interfaces"));
            }

            foreach (var result in _specification.Validate())
            {
                yield return(result);
            }
        }
 public IEnumerable <ValidationResult> Validate()
 {
     return(_consumerFactory.Validate().Concat(_specification.Validate()));
 }