Beispiel #1
0
            private bool ValidateRule(EtlFieldValidationRule rule)
            {
                var value = ReadValue(rule);

                if (_wasReaderError)
                {
                    return(false);
                }

                if (!rule.IsValid(value))
                {
                    LogValidationErrorMessage
                    (
                        rule.ErrorMessage,
                        _reader.CurrentRecordIndex,
                        null,
                        rule.SourceName,
                        null
                    );

                    return(false);
                }
                else
                {
                    return(true);
                }
            }
Beispiel #2
0
 private string ReadValue(EtlFieldValidationRule rule)
 {
     if (!string.IsNullOrEmpty(rule.SourceName))
     {
         return(_reader[rule.SourceName]);
     }
     else
     {
         return(null);
     }
 }
            private bool ValidateRule(EtlFieldValidationRule rule)
            {
                var value = ReadValue(rule);
                if (_wasReaderError)
                {
                    return false;
                }

                if (!rule.IsValid(value))
                {
                    LogValidationErrorMessage
                    (
                        rule.ErrorMessage,
                        _reader.CurrentRecordIndex,
                        null,
                        rule.SourceName,
                        null
                    );

                    return false;
                }
                else
                {
                    return true;
                }
            }
 private string ReadValue(EtlFieldValidationRule rule)
 {
     if (!string.IsNullOrEmpty(rule.SourceName))
     {
         return _reader[rule.SourceName];
     }
     else
     {
         return null;
     }
 }