Jypeli  9
The simple game programming library
TextReader.cs
Siirry tämän tiedoston dokumentaatioon.
1 using System.Collections.Generic;
3 using System.IO;
4 
5 namespace Jypeli
6 {
10  public class TextReader : ContentTypeReader<string[]>
11  {
18  protected override string[] Read( ContentReader input, string[] existingInstance )
19  {
20  List<string> list = new List<string>();
21 
22  using ( StreamReader reader = new StreamReader( input.BaseStream ) )
23  {
24  while ( !reader.EndOfStream )
25  {
26  string line = reader.ReadLine();
27  list.Add( line );
28  }
29  }
30 
31  return list.ToArray();
32  }
33  }
34 }
Microsoft.Xna
Definition: JypeliContentManager.cs:6
Jypeli.TextReader
Reads string arrays from content.
Definition: TextReader.cs:11
Jypeli
Definition: Automobile.cs:5
Jypeli.TextReader.Read
override string[] Read(ContentReader input, string[] existingInstance)
Performs the actual reading.
Definition: TextReader.cs:18
Microsoft
Definition: JypeliContentManager.cs:6
Microsoft.Xna.Framework
Definition: JypeliContentManager.cs:6
Microsoft.Xna.Framework.Content
Definition: JypeliContentManager.cs:6
System
Definition: CFFauxAttributes.cs:29