Skip to content

Commit 98ec7e0

Browse files
committed
Move table data code to main
1 parent ff15248 commit 98ec7e0

11 files changed

+26
-7
lines changed

Experimental/src/CodeJam.Experimental.csproj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,11 @@
6666
<Compile Include="CmdLine\Parser\QuotedOrNonquotedValueNode.cs" />
6767
<Compile Include="CmdLine\PrintUsageSettings.cs" />
6868
<Compile Include="CmdLine\UsagePrinter.cs" />
69-
<Compile Include="TableData\CsvFormat.cs" />
70-
<Compile Include="TableData\FixedWidthFormat.cs" />
71-
<Compile Include="TableData\ITableDataFormatter.cs" />
72-
<Compile Include="TableData\TableDataParser.cs" />
73-
<Compile Include="TableData\TableDataPrinter.cs" />
7469
<Compile Include="Ranges\ImmutableRangeList.cs" />
7570
<Compile Include="Ranges\ImmutableRangeListExtensions.cs" />
7671
<Compile Include="Ranges\Range%271.cs" />
7772
<Compile Include="Ranges\Range.cs" />
7873
<Compile Include="Properties\AssemblyInfo.cs" />
79-
<Compile Include="TableData\DataLine.cs" />
8074
</ItemGroup>
8175
<ItemGroup>
8276
<ProjectReference Include="..\..\Main\src\CodeJam.Main.csproj">

Experimental/tests/CodeJam.Experimental-Tests.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
<Compile Include="CmdLine\CheckerTest.cs" />
4343
<Compile Include="CmdLine\ParserTest.cs" />
4444
<Compile Include="CmdLine\PrintUsageTest.cs" />
45-
<Compile Include="TableData\TableDataTest.cs" />
4645
<Compile Include="Ranges\ImmutableRangeListTests.cs" />
4746
<Compile Include="Ranges\RangeTests.cs" />
4847
<Compile Include="Properties\AssemblyInfo.cs" />

Main/src/CodeJam.Main.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@
8080
<Compile Include="Services\IServicePublisher.cs" />
8181
<Compile Include="Services\ServiceContainer.cs" />
8282
<Compile Include="Services\ServiceProviderHelper.cs" />
83+
<Compile Include="TableData\CsvFormat.cs" />
84+
<Compile Include="TableData\DataLine.cs" />
85+
<Compile Include="TableData\FixedWidthFormat.cs" />
86+
<Compile Include="TableData\ITableDataFormatter.cs" />
87+
<Compile Include="TableData\TableDataParser.cs" />
88+
<Compile Include="TableData\TableDataPrinter.cs" />
8389
<Compile Include="Targeting\CustomAttributeExtensions.cs" />
8490
<Compile Include="Targeting\PlatformDependent.cs" />
8591
<Compile Include="Collections\ArrayExtensions.cs" />

Experimental/src/TableData/CsvFormat.cs renamed to Main/src/TableData/CsvFormat.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,11 @@ private enum ParserState
223223
#endregion
224224

225225
#region Formatter
226+
/// <summary>
227+
/// Creates formatter for CSV.
228+
/// </summary>
229+
/// <param name="allowEscaping">If true, use escaping.</param>
230+
/// <returns>Formatter instance</returns>
226231
public static ITableDataFormatter CreateFormatter(bool allowEscaping = true) =>
227232
allowEscaping
228233
? (ITableDataFormatter)new CsvFormatter()

Experimental/src/TableData/DataLine.cs renamed to Main/src/TableData/DataLine.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
namespace CodeJam.TableData
66
{
7+
/// <summary>
8+
/// Line of data.
9+
/// </summary>
710
[PublicAPI]
811
public struct DataLine
912
{
@@ -14,8 +17,16 @@ public DataLine(int lineNum, string[] values)
1417
Values = values;
1518
}
1619

20+
/// <summary>
21+
/// Line number.
22+
/// </summary>
1723
public int LineNum { get; }
1824

25+
/// <summary>
26+
/// Line values.
27+
/// </summary>
28+
[NotNull]
29+
[ItemNotNull]
1930
public string[] Values { get; }
2031

2132
#region Overrides of ValueType
File renamed without changes.

Experimental/src/TableData/ITableDataFormatter.cs renamed to Main/src/TableData/ITableDataFormatter.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
namespace CodeJam.TableData
44
{
5+
/// <summary>
6+
/// Formatter interface.
7+
/// </summary>
58
[PublicAPI]
69
public interface ITableDataFormatter
710
{
File renamed without changes.
File renamed without changes.

Main/tests/CodeJam.Main-Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
<Compile Include="Reflection\AssemblyExtensionsTest.cs" />
7272
<Compile Include="Reflection\CreateInstanceTests.cs" />
7373
<Compile Include="Services\ServicesTests.cs" />
74+
<Compile Include="TableData\TableDataTest.cs" />
7475
<Compile Include="Threading\ParallelQueueTest.cs" />
7576
<Compile Include="Properties\AssemblyInfo.cs" />
7677
<Compile Include="Reflection\InfoOfTest.cs" />

0 commit comments

Comments
 (0)