Innovenergy_trunk/csharp/Lib/S3/Drivers/Internal/Writer.public.cs

26 lines
613 B
C#
Raw Normal View History

using InnovEnergy.Lib.S3.Records;
using InnovEnergy.Lib.S3.Records.Specialized;
using InnovEnergy.Lib.Time.Unix;
2023-02-16 12:57:06 +00:00
using InnovEnergy.Lib.Utils;
namespace InnovEnergy.Lib.S3.Drivers.Internal;
2023-02-16 12:57:06 +00:00
public partial class Writer
{
public Task WriteRecord(Record record)
{
return WriteRecord(record, UnixTime.Now);
}
public Task WriteRecord(TimeStampedRecord tsr)
{
return WriteRecord(tsr.Record, tsr.TimeStamp);
}
public Task WriteRecord(Record record, UnixTime time)
{
return Aggregate(record, time)
.Select(WriteRecord)
.WhenAll();
}
}