예제 #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;
            }
        }
예제 #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;
 }
예제 #3
0
 public CsvDictionaryConsumer(IDictionarySource <CsvDataRecord> source, ColumnNameMode columnMode, string tableName) : base(source, columnMode, tableName)
 {
 }
예제 #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;
 }