aboutsummaryrefslogtreecommitdiff
path: root/RhSolutions.ExcelExtensions/ColumnEnumerator.cs
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2023-04-06 08:29:39 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2023-04-06 08:29:39 +0300
commitbfd7702939a162f62c46375762ceec9cd524f66a (patch)
treed496cd01929df64f013a9bfa6be7702afe30b4eb /RhSolutions.ExcelExtensions/ColumnEnumerator.cs
parent448af8ecd7bf9db070e090c4b434da693ba0ae89 (diff)
DI Refactoring
Diffstat (limited to 'RhSolutions.ExcelExtensions/ColumnEnumerator.cs')
-rw-r--r--RhSolutions.ExcelExtensions/ColumnEnumerator.cs54
1 files changed, 0 insertions, 54 deletions
diff --git a/RhSolutions.ExcelExtensions/ColumnEnumerator.cs b/RhSolutions.ExcelExtensions/ColumnEnumerator.cs
deleted file mode 100644
index 9880b5d..0000000
--- a/RhSolutions.ExcelExtensions/ColumnEnumerator.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-using System.Collections;
-
-namespace RhSolutions.ExcelExtensions;
-
-public class ColumnEnumerator : IEnumerator<TableCell>
-{
- public Range Range { get; }
- public Table ParentTable { get; }
- private int position = 0;
- object IEnumerator.Current
- {
- get
- {
- return Current;
- }
- }
-
- public TableCell Current
- {
- get
- {
- try
- {
- return new TableCell(Range.Cells[position, 1], ParentTable);
- }
- catch (IndexOutOfRangeException)
- {
- throw new InvalidOperationException();
- }
- }
- }
-
- public ColumnEnumerator(Range range, Table table)
- {
- Range = range;
- ParentTable = table;
- }
-
- public bool MoveNext()
- {
- position++;
- return (position <= Range.Rows.Count);
- }
-
- public void Reset()
- {
- position = 0;
- }
-
- public void Dispose()
- {
-
- }
-}