mirror of
https://github.com/codex-storage/cs-codex-dist-tests.git
synced 2025-02-23 09:18:35 +00:00
25 lines
578 B
C#
25 lines
578 B
C#
|
using Logging;
|
|||
|
using OverwatchTranscript;
|
|||
|
|
|||
|
namespace TranscriptAnalysis.Receivers
|
|||
|
{
|
|||
|
public abstract class BaseReceiver<T> : IEventReceiver<T>
|
|||
|
{
|
|||
|
protected ILog log { get; private set; } = new NullLog();
|
|||
|
|
|||
|
public abstract string Name { get; }
|
|||
|
public abstract void Receive(ActivateEvent<T> @event);
|
|||
|
public abstract void Finish();
|
|||
|
|
|||
|
public void Init(ILog log)
|
|||
|
{
|
|||
|
this.log = new LogPrefixer(log, $"({Name}) ");
|
|||
|
}
|
|||
|
|
|||
|
protected void Log(string msg)
|
|||
|
{
|
|||
|
log.Log(msg);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|