cs-codex-dist-tests/Framework/OverwatchTranscript/Transcript.cs

24 lines
612 B
C#
Raw Normal View History

2024-08-02 06:56:49 +00:00
using Logging;
namespace OverwatchTranscript
2024-07-25 14:00:51 +00:00
{
public static class Transcript
{
2024-08-02 06:56:49 +00:00
public static ITranscriptWriter NewWriter(ILog log)
2024-07-25 14:00:51 +00:00
{
2024-08-02 06:56:49 +00:00
log = new LogPrefixer(log, "(TranscriptWriter) ");
return new TranscriptWriter(log, NewWorkDir());
2024-07-25 14:00:51 +00:00
}
public static ITranscriptReader NewReader(string transcriptFile)
{
return new TranscriptReader(NewWorkDir(), transcriptFile);
}
private static string NewWorkDir()
{
return Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
}
}
}