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

26 lines
613 B
C#

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