コード例 #1
0
ファイル: IOUtils.cs プロジェクト: TheLe0/NUtils
 /// <summary>
 /// Reads the data stored in the given stream and modifies the given <see cref="IReadable"/>.
 /// </summary>
 /// <param name="readable">The <see cref="IReadable"/> that reads data from the given <see cref="Stream"/>.</param>
 /// <param name="stream">The given <see cref="Stream"/> that contains the data.</param>
 public static void ReadFromStream(this IReadable readable, Stream stream)
 {
     using (TextReader tr = new StreamReader(stream)) {
         readable.ReadFromStream(tr);
     }
 }