diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2023-04-06 08:29:39 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2023-04-06 08:29:39 +0300 |
commit | bfd7702939a162f62c46375762ceec9cd524f66a (patch) | |
tree | d496cd01929df64f013a9bfa6be7702afe30b4eb /RhSolutions.ExcelExtensions/Cell.cs | |
parent | 448af8ecd7bf9db070e090c4b434da693ba0ae89 (diff) |
DI Refactoring
Diffstat (limited to 'RhSolutions.ExcelExtensions/Cell.cs')
-rw-r--r-- | RhSolutions.ExcelExtensions/Cell.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/RhSolutions.ExcelExtensions/Cell.cs b/RhSolutions.ExcelExtensions/Cell.cs new file mode 100644 index 0000000..19a2017 --- /dev/null +++ b/RhSolutions.ExcelExtensions/Cell.cs @@ -0,0 +1,26 @@ +namespace RhSolutions.ExcelExtensions; + +public sealed class Cell +{ + public Table ParentTable { get; } + public Row ParentRow + { + get => ParentTable.Rows[ParentTable.Range.Row - _range.Row]; + } + public Column ParentColumn + { + get => ParentTable.Columns[ParentTable.Range.Column - _range.Column]; + } + public object Value + { + get => _range.Cells[1, 1].Value2; + set => _range.Cells[1, 1].Value2 = value; + } + private Range _range; + + public Cell(Range range, Table table) + { + _range = range; + ParentTable = table; + } +} |