mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2026-01-04 00:57:13 -08:00
Update 82_Stars with common library
This commit is contained in:
@@ -94,6 +94,13 @@ public interface IReadWrite
|
||||
/// <param name="value">The <see cref="object" /> to be written.</param>
|
||||
void WriteLine(object value);
|
||||
|
||||
/// <summary>
|
||||
/// Writes a formatted string to output.
|
||||
/// </summary>
|
||||
/// <param name="format">The format <see cref="string" /> to be written.</param>
|
||||
/// <param name="value">The values to be inserted into the format.</param>
|
||||
void WriteLine(string format, params object[] values);
|
||||
|
||||
/// <summary>
|
||||
/// Writes the contents of a <see cref="Stream" /> to output.
|
||||
/// </summary>
|
||||
|
||||
@@ -99,6 +99,8 @@ public class TextIO : IReadWrite
|
||||
|
||||
public void WriteLine(object value) => _output.WriteLine(value.ToString());
|
||||
|
||||
public void WriteLine(string format, params object[] values) => _output.WriteLine(format, values);
|
||||
|
||||
public void Write(Stream stream, bool keepOpen = false)
|
||||
{
|
||||
using var reader = new StreamReader(stream);
|
||||
|
||||
Reference in New Issue
Block a user