-
Notifications
You must be signed in to change notification settings - Fork 94
/
Attributes.cs
42 lines (34 loc) · 946 Bytes
/
Attributes.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
namespace InfluxDB.Client.Core
{
/// <summary>
/// The annotation is used for mapping POCO class into line protocol.
/// </summary>
[AttributeUsage(AttributeTargets.Class)]
public sealed class Measurement : Attribute
{
public string Name { get; }
public Measurement(string name)
{
Name = name;
}
}
/// <summary>
/// The annotation is used to customize bidirectional mapping between POCO and Flux query result or Line Protocol.
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public sealed class Column : Attribute
{
public string Name { get; }
public bool IsMeasurement { get; set; }
public bool IsTag { get; set; }
public bool IsTimestamp { get; set; }
public Column()
{
}
public Column(string name)
{
Name = name;
}
}
}