|
@@ -38,13 +38,13 @@
|
|
|
for (int i = 0, rowCount = table.Rows.Count; i < rowCount; i++)
|
|
|
{
|
|
|
var row = table.Rows[i];
|
|
|
- GetKeyProperty(row, out var key, out var summary);
|
|
|
+ GetKeyProperty(row, out var key, out var value, out var summary);
|
|
|
if (string.IsNullOrEmpty(key))
|
|
|
continue;
|
|
|
if (hashTable.Contains(key))
|
|
|
continue;
|
|
|
writer.Summary(summary);
|
|
|
- writer.WriteLine($"public readonly static string {key} = \"{key}\";");
|
|
|
+ writer.WriteLine($"public readonly static string {key} = \"{value}\";");
|
|
|
hashTable.Add(key);
|
|
|
}
|
|
|
writer.EndBracket();
|
|
@@ -53,14 +53,15 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void GetKeyProperty(Row row, out string key, out string summary)
|
|
|
+ private void GetKeyProperty(Row row, out string key, out string value, out string summary)
|
|
|
{
|
|
|
- key = summary = string.Empty;
|
|
|
+ key = value = summary = string.Empty;
|
|
|
foreach (var cell in row.Cells)
|
|
|
{
|
|
|
if ("target".Equals(cell.FieldInfo.FieldName, StringComparison.OrdinalIgnoreCase))
|
|
|
{
|
|
|
key = cell.Value.ToTitleCase();
|
|
|
+ value = cell.Value;
|
|
|
}
|
|
|
else if ("id".Equals(cell.FieldInfo.FieldName, StringComparison.OrdinalIgnoreCase))
|
|
|
{
|