コード例 #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)
 {
 }
コード例 #5
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 DefaultKeyValueConsumer(
     IKeyValueSource source, ColumnNameMode columnMode, string tableName)
     : this(source, columnMode, (KeyValueConfiguration)null)
 {
     this.tableName = tableName;
 }