From 83602391abb57feb5bbac7d44ac0154833b9b41a Mon Sep 17 00:00:00 2001 From: Nathan McRae Date: Thu, 15 Feb 2024 14:22:04 -0800 Subject: [PATCH] Remove Columns from SaneTsv To simplify object manipulation for now. Note that this got rid of uniqueness checking for the current implementation. --- SaneTsv/SaneTsv.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/SaneTsv/SaneTsv.cs b/SaneTsv/SaneTsv.cs index 2418de6..4fef70e 100644 --- a/SaneTsv/SaneTsv.cs +++ b/SaneTsv/SaneTsv.cs @@ -30,7 +30,6 @@ public class SaneTsv // TODO: We need to be able to update all these in tandem somehow public string[] ColumnNames { get; protected set; } public ColumnType[] ColumnTypes { get; protected set; } - public Dictionary> Columns { get; protected set; } public List Records { get; protected set; } public string FileComment { get; protected set; } = null; @@ -53,7 +52,6 @@ public class SaneTsv protected static SaneTsv Parse(byte[] inputBuffer, FormatType format) { var parsed = new SaneTsv(); - parsed.Columns = new Dictionary>(); parsed.ColumnNames = new string[] { }; parsed.ColumnTypes = new ColumnType[] { }; parsed.Records = new List(); @@ -191,14 +189,7 @@ public class SaneTsv throw new Exception($"Invalid type '{columnTypeString}' for column {j}"); } - try - { - parsed.Columns.Add(columnName, new List()); - } - catch (Exception e) - { - throw new Exception($"Column name {columnName} is not unique", e); - } + // TODO: Check column name uniqueness parsed.ColumnNames[j] = columnName; parsed.ColumnTypes[j] = type;