public ColumnInserterFactory(
     string name,
     int targetColumnIndex,
     string targetColumnName,
     ICellInserter <string> cellInserter)
 {
     this.Name = name;
     this.targetColumnIndex = targetColumnIndex;
     this.targetColumnName  = targetColumnName;
     this.cellInserter      = cellInserter;
 }
示例#2
0
        public ColumnInserter(
            ICellInserter <string> cellInserter,
            int targetColumnIndex,
            string targetColumnName)
        {
            this.cellInserter      = cellInserter ?? throw new ArgumentNullException(nameof(cellInserter));
            this.targetColumnIndex = targetColumnIndex;

            if (string.IsNullOrEmpty(targetColumnName))
            {
                throw new ArgumentException("Column name cannot be empty", nameof(targetColumnName));
            }

            this.targetColumnName = targetColumnName;
        }