Skip to content

Commit

Permalink
Internalize SepReaderHeader ctor (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
nietras authored Apr 15, 2024
1 parent 1a25a83 commit ef2ccd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1678,7 +1678,6 @@ namespace nietras.SeparatedValues
}
public sealed class SepReaderHeader
{
public SepReaderHeader(string row, System.Collections.Generic.Dictionary<string, int> colNameToIndex) { }
public System.Collections.Generic.IReadOnlyList<string> ColNames { get; }
public bool IsEmpty { get; }
public static nietras.SeparatedValues.SepReaderHeader Empty { get; }
Expand Down
4 changes: 2 additions & 2 deletions src/Sep/SepReaderHeader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ public sealed class SepReaderHeader
readonly Dictionary<string, int> _colNameToIndex;
readonly string[] _colNames;

public SepReaderHeader(string row, Dictionary<string, int> colNameToIndex)
internal SepReaderHeader(string row, Dictionary<string, int> colNameToIndex)
{
_row = row;
_colNameToIndex = colNameToIndex;
_colNames = _colNameToIndex.Keys.ToArray();
}

public static SepReaderHeader Empty { get; } = new(string.Empty, new Dictionary<string, int>());
public static SepReaderHeader Empty { get; } = new(string.Empty, []);

internal static SepReaderHeader Parse(Sep sep, string line) =>
Parse(sep, line, SepDefaults.ColNameComparer);
Expand Down

0 comments on commit ef2ccd9

Please sign in to comment.