Cauldron/Cauldron.Core/CauldronWriter.cs

19 lines
297 B
C#
Raw Normal View History

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