Cauldron/Cauldron.Core/CauldronWriter.cs

19 lines
297 B
C#
Raw Normal View History

2023-07-19 19:30:39 +00:00
using System;
2023-07-21 20:11:56 +00:00
namespace Cauldron.Core;
2023-07-19 19:30:39 +00:00
2023-07-21 20:11:56 +00:00
public class CauldronWriter
2023-07-19 19:30:39 +00:00
{
private Func<object, Task> OutputFunc { get; set; }
2023-07-21 20:11:56 +00:00
public CauldronWriter(Func<object, Task> outputFunc)
2023-07-19 19:30:39 +00:00
{
this.OutputFunc = outputFunc;
}
public async Task Output(object obj)
2023-07-19 19:30:39 +00:00
{
await this.OutputFunc(obj);
}
}