Skip to content

Commit

Permalink
rename internal ToStringRaw to ToStringDirect
Browse files Browse the repository at this point in the history
  • Loading branch information
nietras committed Nov 18, 2023
1 parent 0c5dddf commit 91107e2
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Sep.Test/SepReaderColTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void SepReaderColTest_ToString()
[TestMethod]
public void SepReaderColTest_ToStringRaw()
{
Run(col => Assert.AreEqual(ColText, col.ToStringRaw()));
Run(col => Assert.AreEqual(ColText, col.ToStringDirect()));
Run(col => Assert.AreSame(string.Empty, col.ToString()), "");
}

Expand Down
2 changes: 1 addition & 1 deletion src/Sep.Test/SepReaderColsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public unsafe void SepReaderColsTest_Select_MethodPointer_ToString()
[TestMethod]
public void SepReaderColsTest_Select_ToStringRaw()
{
Run((cols, range) => CollectionAssert.AreEqual(_colTexts[range], cols.Select(c => c.ToStringRaw()).ToArray()));
Run((cols, range) => CollectionAssert.AreEqual(_colTexts[range], cols.Select(c => c.ToStringDirect()).ToArray()));
}

static string ToString(SepReader.Col col) => col.ToString();
Expand Down
2 changes: 1 addition & 1 deletion src/Sep/SepReader.Col.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ internal Col(SepReaderState state, int colIndex)

// Allow opt out of pooling and don't add yet another configuration option
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal string ToStringRaw() => _state.ToStringRaw(_colIndex);
internal string ToStringDirect() => _state.ToStringDirect(_colIndex);

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public T Parse<T>() where T : ISpanParsable<T> => _state.Parse<T>(_colIndex);
Expand Down
2 changes: 1 addition & 1 deletion src/Sep/SepReader.Row.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ ColDebugView[] GetCols()
var maybeHeader = _state._hasHeader ? _state._header : null;
for (var colIndex = 0; colIndex < cols.Length; colIndex++)
{
var colValue = row[colIndex].ToStringRaw();
var colValue = row[colIndex].ToStringDirect();
cols[colIndex] = new(colIndex, maybeHeader?.ColNames[colIndex], colValue);
}
return cols;
Expand Down
2 changes: 1 addition & 1 deletion src/Sep/SepReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ internal void Initialize(SepReaderOptions options)
var colNameToIndex = new Dictionary<string, int>(_colCount);
for (var colIndex = 0; colIndex < _colCount; colIndex++)
{
var colName = ToStringRaw(colIndex);
var colName = ToStringDirect(colIndex);
colNameToIndex.Add(colName, colIndex);
}
var headerRow = new string(RowSpan());
Expand Down
2 changes: 1 addition & 1 deletion src/Sep/SepReaderState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ internal string ToStringDefault(int index)
return _toString.ToString(span, index);
}

internal string ToStringRaw(int index)
internal string ToStringDirect(int index)
{
var span = GetColSpan(index);
var s = TryGetStaticallyCachedString(span);
Expand Down

0 comments on commit 91107e2

Please sign in to comment.