Ejemplo n.º 1
0
 public static IEnumerable <RomajiKana> LoadRomajiKanas(IEnumerable <string> data)
 {
     foreach (var line in data)
     {
         var        splitMe = line.Split('@');
         RomajiKana rk      = new RomajiKana
         {
             Romaji   = splitMe[0],
             Hiragana = splitMe[1],
             Katakana = splitMe[2]
         };
         yield return(rk);
     }
 }
Ejemplo n.º 2
0
 private static IEnumerable <RomajiKana> LoadRomajiKanas(string file)
 {
     using (StreamReader sr = new StreamReader(file))
     {
         while (!sr.EndOfStream)
         {
             var        splitMe = sr.ReadLine().Split('@');
             RomajiKana rk      = new RomajiKana
             {
                 Romaji   = splitMe[0],
                 Hiragana = splitMe[1],
                 Katakana = splitMe[2]
             };
             yield return(rk);
         }
     }
 }