Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@danemorgridge
Copy link
Contributor

When creating an excel document we need to provide both the column index and the column name. Using 2 attributes doesn't work for writing, so I've added an additional constructor that does allow for that

@codecov
Copy link

codecov bot commented Apr 20, 2022

Codecov Report

Merging #182 (647adc1) into master (dde5ac4) will decrease coverage by 0.44%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #182      +/-   ##
==========================================
- Coverage   93.95%   93.51%   -0.45%     
==========================================
  Files          10       10              
  Lines        1258     1264       +6     
  Branches      184      184              
==========================================
  Hits         1182     1182              
- Misses         46       52       +6     
  Partials       30       30              
Impacted Files Coverage Δ
ExcelMapper/Attributes/ColumnAttribute.cs 74.07% <0.00%> (-21.17%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dde5ac4...647adc1. Read the comment docs.

@mganss
Copy link
Owner

mganss commented Apr 20, 2022

Can't you use named parameters for the attribute?

[Column("Name", Index = 1)]

@danemorgridge
Copy link
Contributor Author

When I try that I get the following compile error: "'Index' is not a valid named attribute argument. Named attribute arguments must be fields which are not readonly, static, or const, or read-write properties which are public and not static."

@mganss
Copy link
Owner

mganss commented Apr 20, 2022

True. I didn't realize the properties were read-only.

@mganss mganss merged commit efc3efd into mganss:master Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants