Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
            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);
            }
Ejemplo n.º 3
0
            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);
            }
Ejemplo n.º 4
0
 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);
 }