public void Add(DomainValidationError error) { if (error == null) { throw new NullReferenceException("Domain validation error cannot be null."); } errors.Add(error); }
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 }; }