private void ValidateConfiguration()

in Source/Tx.Bond/BinaryEtlReader.cs [44:73]


        private void ValidateConfiguration()
        {
            if (this.startTime.HasValue != this.endTime.HasValue)
            {
                throw new ArgumentException("Specify both start and end times or leave both of them null.");
            }

            if (this.startTime.HasValue && this.startTime.Value >= this.endTime.Value)
            {
                throw new ArgumentException("Start time should be less than end time.");
            }

            if (this.files == null)
            {
                throw new ArgumentNullException("files");
            }

            if (this.files.Length == 0)
            {
                throw new ArgumentException("Files parameter should contain at least one element.", "files");
            }

            foreach (var path in this.files)
            {
                if (!PathUtils.IsValidPath(path))
                {
                    throw new ArgumentException("Files parameter contains invalid element - " + path + ".", "files");
                }
            }
        }