示例#1
0
 public TextWrangler(string recordConfigName,
                     IRecordReader recordReader,
                     IRecordBuilder recordBuilder           = null,
                     IFieldFormatter fieldFormatter         = null,
                     IFieldFilterService fieldFilterService = null,
                     IRecordWriter recordWriter             = null)
     : this(RecordConfigurationBuilder.Build(recordConfigName), recordReader,
            recordBuilder, fieldFormatter, fieldFilterService, recordWriter)
 {
 }
示例#2
0
        public TextWrangler(RecordConfiguration recordConfiguration,
                            IRecordReader recordReader,
                            IRecordBuilder recordBuilder           = null,
                            IFieldFormatter fieldFormatter         = null,
                            IFieldFilterService fieldFilterService = null,
                            IRecordWriter recordWriter             = null)
        {
            _recordConfiguration = recordConfiguration ?? throw new ArgumentNullException(nameof(recordReader));
            _recordReader        = recordReader ?? throw new ArgumentNullException(nameof(recordReader));

            // Validate the configuration
            RecordConfigurationValidator.Instance.Validate(_recordConfiguration, _fieldFilterService);

            _recordBuilder      = recordBuilder ?? TextWranglerConfig.DefaultRecordBuilder;
            _fieldFormatter     = fieldFormatter ?? TextWranglerConfig.DefaultFieldFormatter;
            _fieldFilterService = fieldFilterService ?? TextWranglerConfig.DefaultFieldFilterService;
            _recordWriter       = recordWriter ?? TextWranglerConfig.DefaultRecordWriter;

            _logger = LogManager.GetLogger(GetType().Name);
        }
 protected Query(IRecordBuilder recordBuilder)
 {
     RecordBuilder = recordBuilder;
 }