diff --git a/example/bin/Release/net8.0/ConsoleAppVisuals.dll b/example/bin/Release/net8.0/ConsoleAppVisuals.dll
index 480387f3..313cf334 100644
Binary files a/example/bin/Release/net8.0/ConsoleAppVisuals.dll and b/example/bin/Release/net8.0/ConsoleAppVisuals.dll differ
diff --git a/example/bin/Release/net8.0/ConsoleAppVisuals.pdb b/example/bin/Release/net8.0/ConsoleAppVisuals.pdb
index 94a01e3f..89e3faca 100644
Binary files a/example/bin/Release/net8.0/ConsoleAppVisuals.pdb and b/example/bin/Release/net8.0/ConsoleAppVisuals.pdb differ
diff --git a/example/bin/Release/net8.0/ConsoleAppVisuals.xml b/example/bin/Release/net8.0/ConsoleAppVisuals.xml
index 2e4a1f73..9d81ffd0 100644
--- a/example/bin/Release/net8.0/ConsoleAppVisuals.xml
+++ b/example/bin/Release/net8.0/ConsoleAppVisuals.xml
@@ -1466,6 +1466,11 @@
This property returns the number of lines in the table.
+
+
+ This property returns the display array of the table.
+
+
The natural constructor.
diff --git a/example/bin/Release/net8.0/example.dll b/example/bin/Release/net8.0/example.dll
index ef528365..2dc719a6 100644
Binary files a/example/bin/Release/net8.0/example.dll and b/example/bin/Release/net8.0/example.dll differ
diff --git a/example/bin/Release/net8.0/example.pdb b/example/bin/Release/net8.0/example.pdb
index 9ac3438d..3ff0447c 100644
Binary files a/example/bin/Release/net8.0/example.pdb and b/example/bin/Release/net8.0/example.pdb differ
diff --git a/src/ConsoleAppVisuals/bin/Release/net6.0/ConsoleAppVisuals.dll b/src/ConsoleAppVisuals/bin/Release/net6.0/ConsoleAppVisuals.dll
index 55d8aab8..c5e78036 100644
Binary files a/src/ConsoleAppVisuals/bin/Release/net6.0/ConsoleAppVisuals.dll and b/src/ConsoleAppVisuals/bin/Release/net6.0/ConsoleAppVisuals.dll differ
diff --git a/src/ConsoleAppVisuals/bin/Release/net6.0/ConsoleAppVisuals.pdb b/src/ConsoleAppVisuals/bin/Release/net6.0/ConsoleAppVisuals.pdb
index a40cc282..f7822d06 100644
Binary files a/src/ConsoleAppVisuals/bin/Release/net6.0/ConsoleAppVisuals.pdb and b/src/ConsoleAppVisuals/bin/Release/net6.0/ConsoleAppVisuals.pdb differ
diff --git a/src/ConsoleAppVisuals/bin/Release/net6.0/ConsoleAppVisuals.xml b/src/ConsoleAppVisuals/bin/Release/net6.0/ConsoleAppVisuals.xml
index 2e4a1f73..9d81ffd0 100644
--- a/src/ConsoleAppVisuals/bin/Release/net6.0/ConsoleAppVisuals.xml
+++ b/src/ConsoleAppVisuals/bin/Release/net6.0/ConsoleAppVisuals.xml
@@ -1466,6 +1466,11 @@
This property returns the number of lines in the table.
+
+
+ This property returns the display array of the table.
+
+
The natural constructor.
diff --git a/src/ConsoleAppVisuals/bin/Release/net7.0/ConsoleAppVisuals.dll b/src/ConsoleAppVisuals/bin/Release/net7.0/ConsoleAppVisuals.dll
index c9badbae..62e392a8 100644
Binary files a/src/ConsoleAppVisuals/bin/Release/net7.0/ConsoleAppVisuals.dll and b/src/ConsoleAppVisuals/bin/Release/net7.0/ConsoleAppVisuals.dll differ
diff --git a/src/ConsoleAppVisuals/bin/Release/net7.0/ConsoleAppVisuals.pdb b/src/ConsoleAppVisuals/bin/Release/net7.0/ConsoleAppVisuals.pdb
index 7c468a79..26b06f59 100644
Binary files a/src/ConsoleAppVisuals/bin/Release/net7.0/ConsoleAppVisuals.pdb and b/src/ConsoleAppVisuals/bin/Release/net7.0/ConsoleAppVisuals.pdb differ
diff --git a/src/ConsoleAppVisuals/bin/Release/net7.0/ConsoleAppVisuals.xml b/src/ConsoleAppVisuals/bin/Release/net7.0/ConsoleAppVisuals.xml
index 2e4a1f73..9d81ffd0 100644
--- a/src/ConsoleAppVisuals/bin/Release/net7.0/ConsoleAppVisuals.xml
+++ b/src/ConsoleAppVisuals/bin/Release/net7.0/ConsoleAppVisuals.xml
@@ -1466,6 +1466,11 @@
This property returns the number of lines in the table.
+
+
+ This property returns the display array of the table.
+
+
The natural constructor.
diff --git a/src/ConsoleAppVisuals/bin/Release/net8.0/ConsoleAppVisuals.dll b/src/ConsoleAppVisuals/bin/Release/net8.0/ConsoleAppVisuals.dll
index 480387f3..313cf334 100644
Binary files a/src/ConsoleAppVisuals/bin/Release/net8.0/ConsoleAppVisuals.dll and b/src/ConsoleAppVisuals/bin/Release/net8.0/ConsoleAppVisuals.dll differ
diff --git a/src/ConsoleAppVisuals/bin/Release/net8.0/ConsoleAppVisuals.pdb b/src/ConsoleAppVisuals/bin/Release/net8.0/ConsoleAppVisuals.pdb
index 94a01e3f..89e3faca 100644
Binary files a/src/ConsoleAppVisuals/bin/Release/net8.0/ConsoleAppVisuals.pdb and b/src/ConsoleAppVisuals/bin/Release/net8.0/ConsoleAppVisuals.pdb differ
diff --git a/src/ConsoleAppVisuals/bin/Release/net8.0/ConsoleAppVisuals.xml b/src/ConsoleAppVisuals/bin/Release/net8.0/ConsoleAppVisuals.xml
index 2e4a1f73..9d81ffd0 100644
--- a/src/ConsoleAppVisuals/bin/Release/net8.0/ConsoleAppVisuals.xml
+++ b/src/ConsoleAppVisuals/bin/Release/net8.0/ConsoleAppVisuals.xml
@@ -1466,6 +1466,11 @@
This property returns the number of lines in the table.
+
+
+ This property returns the display array of the table.
+
+
The natural constructor.
diff --git a/src/ConsoleAppVisuals/elements/interactive/TableSelector.cs b/src/ConsoleAppVisuals/elements/interactive/TableSelector.cs
index c47b456a..19bf4684 100644
--- a/src/ConsoleAppVisuals/elements/interactive/TableSelector.cs
+++ b/src/ConsoleAppVisuals/elements/interactive/TableSelector.cs
@@ -92,6 +92,11 @@ public class TableSelector : InteractiveElement
///
public int Count => _rawLines?.Count ?? 0;
+ ///
+ /// This property returns the display array of the table.
+ ///
+ public string[]? DisplayArray => _displayArray;
+
#endregion
#region Constructor
@@ -179,22 +184,17 @@ private bool CheckRawHeadersAndLines()
return false;
}
- if (_rawLines.Count > 0)
+ for (int i = 0; i < _rawLines.Count; i++)
{
- for (int i = 0; i < _rawLines.Count; i++)
+ if (_rawLines[i].Count != _rawHeaders?.Count)
{
- if (_rawLines[i].Count != _rawHeaders?.Count)
- {
- throw new ArgumentException(
- "The number of columns in the table is not consistent(Headers or Lines)."
- );
- }
+ throw new ArgumentException(
+ "The number of columns in the table is not consistent(Headers or Lines)."
+ );
}
-
- return true;
}
- return false;
+ return true;
}
#endregion
diff --git a/testing/elements/interactive/TableSelector.Tests.cs b/testing/elements/interactive/TableSelector.Tests.cs
index 0847fe8e..f3cd2977 100644
--- a/testing/elements/interactive/TableSelector.Tests.cs
+++ b/testing/elements/interactive/TableSelector.Tests.cs
@@ -685,4 +685,32 @@ public void CheckRawHeadersAndLines_HeadersNotNullLinesNotNull_NumberConsistent(
Assert.AreEqual(3, tableSelector.Count);
}
#endregion
+
+ #region Build Methods
+ [TestMethod]
+ [TestCategory("TableSelector")]
+ public void BuildHeadersAndLines_HeadersNotNullLinesNotNull()
+ {
+ // Arrange
+ List playersHeaders =
+ new() { "id", "first name", "last name", "national", "slams" };
+ List player1 = new() { "01", "Novak", "Djokovic", "Serbia", "24" };
+ List player2 = new() { "02", "Carlos", "Alkaraz", "Spain", "2" };
+ List player3 = new() { "03", "Roger", "Federer", "Switzerland", "21" };
+
+ var tableSelector = new TableSelector(
+ "Great tennis players",
+ playersHeaders,
+ new List> { player1, player2, player3 }
+ );
+
+ // Act
+ var array = tableSelector.DisplayArray;
+
+ // Assert
+ Assert.IsNotNull(array);
+ }
+
+
+ #endregion
}