public ReadExcelTableService(TValue record) : base(record) { PropertyInfo[] properties = (typeof(TValue)).GetProperties(); foreach (PropertyInfo property in properties) { SimpleExcelColumnAttribute excelColumnAttribute = GetExcelColumnAttribute(property); if (excelColumnAttribute == null) { continue; } _columnProperties.Add(new ExcelColumnProperty { AttributeName = excelColumnAttribute.Name, DefaultValue = excelColumnAttribute.DefaultValue, Property = property }); } }
public ReadExcelValueService(TValue record, IDataReader tableReader) : base(record) { PropertyInfo[] properties = (typeof(TValue)).GetProperties(); foreach (PropertyInfo property in properties) { SimpleExcelColumnAttribute excelColumnAttribute = GetExcelColumnAttribute(property); if (excelColumnAttribute == null) { continue; } ExcelColumnProperty columnProperty = new ExcelColumnProperty { AttributeName = excelColumnAttribute.Name, DefaultValue = excelColumnAttribute.DefaultValue, Property = property }; columnProperty.UpdateFieldContent(tableReader); _columnProperties.Add(columnProperty); } }