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 Dump(object obj)
|
|
|
|
|
{
|
|
|
|
|
await this.OutputFunc(obj);
|
|
|
|
|
}
|
|
|
|
|
}
|