private static void ProcessTable(XmlNode table) { var name = table.Attributes?["name"]?.Value; if (name == null) { throw MakeConfigException.ConfigTableNameMiss(); } var tableConfig = new TableConfig(); table.ForeachNodes("define", define => { var type = new TableConfig.DefineType { FieldName = define.Attributes?["name"]?.Value }; define.TryParseSingleNode("comment", ref type.Description); define.TryParseSingleNode("import", ref type.ImportType); tableConfig.AddDefineType(type); }); TableConfigs.Add(name, tableConfig); }
public static void Add(string table, TableConfig config) { configs.Add(table, config); }