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

26 lines
597 B
C#

using InnovEnergy.S3.Records;
using InnovEnergy.S3.Records.Specialized;
using InnovEnergy.Time.Unix;
using InnovEnergy.Lib.Utils;
namespace InnovEnergy.S3.Drivers.Internal;
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();
}
}