forked from influxdata/influxdb-client-csharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIDomainObjectMapper.cs
22 lines (21 loc) · 908 Bytes
/
IDomainObjectMapper.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using InfluxDB.Client.Api.Domain;
using InfluxDB.Client.Core.Flux.Internal;
using InfluxDB.Client.Writes;
namespace InfluxDB.Client
{
/// <summary>
/// An implementation of this class is used to convert DomainObject entity into <see cref="InfluxDB.Client.Writes.PointData"/>
/// and <see cref="InfluxDB.Client.Core.Flux.Domain.FluxRecord"/> back to DomainObject.
/// </summary>
public interface IDomainObjectMapper : IFluxResultMapper
{
/// <summary>
/// Converts DomainObject to corresponding PointData.
/// </summary>
/// <param name="entity">DomainObject to convert</param>
/// <param name="precision">Required timestamp precision</param>
/// <typeparam name="T">Type of DomainObject</typeparam>
/// <returns>Converted DataPoint</returns>
PointData ConvertToPointData<T>(T entity, WritePrecision precision);
}
}