forked from influxdata/influxdb-client-csharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIFluxResultMapper.cs
27 lines (25 loc) · 947 Bytes
/
IFluxResultMapper.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using InfluxDB.Client.Core.Flux.Domain;
namespace InfluxDB.Client.Core.Flux.Internal
{
/// <summary>
/// Mapper that is used to map FluxRecord into DomainObject.
/// </summary>
public interface IFluxResultMapper
{
/// <summary>
/// Converts FluxRecord to DomainObject specified by Type.
/// </summary>
/// <param name="fluxRecord">Flux record</param>
/// <typeparam name="T">Type of DomainObject</typeparam>
/// <returns>Converted DomainObject</returns>
T ConvertToEntity<T>(FluxRecord fluxRecord);
/// <summary>
/// Converts FluxRecord to DomainObject specified by Type.
/// </summary>
/// <param name="fluxRecord">Flux record</param>
/// <param name="type">Type of DomainObject</param>
/// <returns>Converted DomainObject</returns>
object ConvertToEntity(FluxRecord fluxRecord, Type type);
}
}