Exemple #1
0
        /// <summary>
        /// Initializes a new instance of the DefaultKeyValueConsumer class
        /// </summary>
        /// <param name="source">the source KeyValueSource object that provides raw-key-value data</param>
        /// <param name="columnMode">the column-mode of this consumer</param>
        /// <param name="config">the Key-Value configuration used to configure this consumer</param>
        public DefaultDictionaryConsumer(IDictionarySource <TValue> source, ColumnNameMode columnMode,
                                         KeyValueConfiguration config) : base(source, config?.VirtualColumns ?? new ConstConfigurationCollection())
        {
            if (columnMode == ColumnNameMode.FromConfig && (config?.Columns?.Count ?? 0) == 0)
            {
                throw new ArgumentException("Columns required when the ColumnMode is set to 'FromConfig'!", nameof(config));
            }

            this.columnMode = columnMode;
            this.config     = config;
            if (config != null)
            {
                tableName = config.TableName;
            }
        }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the DefaultKeyValueConsumer class
 /// </summary>
 /// <param name="source">the source KeyValueSource object that provides raw-key-value data</param>
 /// <param name="columnMode">the column-mode of this consumer</param>
 /// <param name="tableName">the table that is used to register the data of this consumer</param>
 public DefaultDictionaryConsumer(
     IDictionarySource <TValue> source, ColumnNameMode columnMode, string tableName)
     : this(source, columnMode, (KeyValueConfiguration)null)
 {
     this.tableName = tableName;
 }
Exemple #3
0
 public CsvDictionaryConsumer(IDictionarySource <CsvDataRecord> source, ColumnNameMode columnMode, string tableName) : base(source, columnMode, tableName)
 {
 }
Exemple #4
0
 public CsvDictionaryConsumer(IDictionarySource <CsvDataRecord> source, ColumnNameMode columnMode, KeyValueConfiguration config) : base(source, columnMode, config)
 {
 }
 /// <summary>
 /// Initializes a new instance of the DefaultKeyValueConsumer class
 /// </summary>
 /// <param name="source">the source KeyValueSource object that provides raw-key-value data</param>
 /// <param name="columnMode">the column-mode of this consumer</param>
 /// <param name="tableName">the table that is used to register the data of this consumer</param>
 public DefaultKeyValueConsumer(
     IKeyValueSource source, ColumnNameMode columnMode, string tableName)
     : this(source, columnMode, (KeyValueConfiguration)null)
 {
     this.tableName = tableName;
 }