示例#1
0
        public void Add(DomainValidationError error)
        {
            if (error == null)
            {
                throw new NullReferenceException("Domain validation error cannot be null.");
            }

            errors.Add(error);
        }
示例#2
0
        public InvariantException(DomainValidationError error, ClientErrorCode clientErrorCode = ClientErrorCode.NotSpecified)
            : base(error.Message)
        {
            if (error == null)
            {
                throw new NullReferenceException("Domain validation error cannot be null.");
            }

            ClientErrorCode = clientErrorCode;
            errors          = new List <DomainValidationError> {
                error
            };
        }