public override void Parse(TextReader reader, WorldCollection worlds, ErrorLogger errors) { TSVParser parser = new TSVParser(reader); foreach (var row in parser.Data) { ParseWorld(worlds, row.dict, row.line, row.lineNumber, errors); } }
private static SophontDictionary Parse(StreamReader reader) { var dict = new SophontDictionary(); var parser = new Serialization.TSVParser(reader); foreach (var row in parser.Data) { dict.Add(row.dict["Code"], row.dict["Name"], row.dict["Location"]); } return(dict); }
private static AllegianceDictionary Parse(StreamReader reader) { Func <string, string> nullIfEmpty = (s) => string.IsNullOrWhiteSpace(s) ? null : s; var dict = new AllegianceDictionary(); var parser = new Serialization.TSVParser(reader); foreach (var row in parser.Data) { dict.Add( row.dict["Code"], row.dict["Legacy"], nullIfEmpty(row.dict["BaseCode"]), row.dict["Name"], nullIfEmpty(row.dict["Location"])); } return(dict); }
public override void Parse(TextReader reader, WorldCollection worlds, ErrorLogger errors) { TSVParser parser = new TSVParser(reader); foreach (var row in parser.Data) ParseWorld(worlds, row.dict, row.line, row.lineNumber, errors); }