Exemplo n.º 1
0
        public IEnumerable <ValidationResult> Validate()
        {
            if (_sagaRepository == null)
            {
                yield return(this.Failure("The saga repository cannot be null. How else are we going to save stuff? #facetopalm"));
            }

            foreach (var result in _specification.Validate())
            {
                yield return(result);
            }
        }
Exemplo n.º 2
0
        public IEnumerable <ValidationResult> Validate()
        {
            if (_stateMachine == null)
            {
                yield return(this.Failure("StateMachine", "must not be null"));
            }
            if (_repository == null)
            {
                yield return(this.Failure("Repository", "must not be null"));
            }

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