Remove Columns from SaneTsv
To simplify object manipulation for now. Note that this got rid of uniqueness checking for the current implementation.
This commit is contained in:
parent
acf083ac6c
commit
ddbda890cf
11
SaneTsv.cs
11
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<string, List<object>> Columns { get; protected set; }
|
||||
public List<SaneTsvRecord> 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<string, List<object>>();
|
||||
parsed.ColumnNames = new string[] { };
|
||||
parsed.ColumnTypes = new ColumnType[] { };
|
||||
parsed.Records = new List<SaneTsvRecord>();
|
||||
@ -191,14 +189,7 @@ public class SaneTsv
|
||||
throw new Exception($"Invalid type '{columnTypeString}' for column {j}");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
parsed.Columns.Add(columnName, new List<object>());
|
||||
}
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user