2022-09-09 18:59:17 +00:00
|
|
|
#nullable enable
|
|
|
|
|
2018-01-18 03:26:52 +00:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using Microsoft.DotNet.Cli.Utils;
|
|
|
|
|
|
|
|
namespace Microsoft.DotNet.Tools.Test.Utilities
|
|
|
|
{
|
|
|
|
public class BufferedReporter : IReporter
|
|
|
|
{
|
|
|
|
public List<string> Lines { get; private set; } = new List<string>();
|
|
|
|
|
2022-09-09 18:59:17 +00:00
|
|
|
public void WriteLine(string format, params object?[] args) => WriteLine(string.Format(format, args));
|
|
|
|
|
2018-01-18 03:26:52 +00:00
|
|
|
public void WriteLine(string message)
|
|
|
|
{
|
|
|
|
Lines.Add(message);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void WriteLine()
|
|
|
|
{
|
|
|
|
Lines.Add("");
|
|
|
|
}
|
|
|
|
|
|
|
|
public void Write(string message)
|
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|