Revize 202135f9
Přidáno uživatelem Pultak před asi 3 roky(ů)
ld_client/LDClient/network/data/ConnectionStatus.cs | ||
---|---|---|
1 |
using System.Runtime.Serialization; |
|
2 |
|
|
3 |
namespace LDClient.network.data { |
|
4 |
public enum ConnectionStatus { |
|
5 |
[EnumMember(Value = "connected")] |
|
6 |
Connected, |
|
7 |
[EnumMember(Value = "disconnected")] |
|
8 |
Disconnected |
|
9 |
|
|
10 |
} |
|
11 |
} |
ld_client/LDClient/network/data/DebuggerInfo.cs | ||
---|---|---|
1 |
using System.Text.Json.Serialization; |
|
2 |
|
|
3 |
namespace LDClient.network.data { |
|
4 |
public class DebuggerInfo { |
|
5 |
|
|
6 |
[JsonPropertyName("serial_number")] |
|
7 |
public string SerialNumber { get; set; } |
|
8 |
} |
|
9 |
} |
ld_client/LDClient/network/data/Payload.cs | ||
---|---|---|
1 |
using System.Text.Json.Serialization; |
|
2 |
using Newtonsoft.Json; |
|
3 |
|
|
4 |
namespace LDClient.network.data { |
|
5 |
[JsonObject(MemberSerialization.OptIn)] |
|
6 |
public class Payload { |
|
7 |
|
|
8 |
[JsonPropertyName("username")] |
|
9 |
public string UserName { get; set; } |
|
10 |
|
|
11 |
[JsonPropertyName("hostname")] |
|
12 |
public string HostName { get; set; } |
|
13 |
|
|
14 |
[JsonPropertyName("timestamp")] |
|
15 |
//[Newtonsoft.Json.JsonConverter(typeof(DateFormatConverter), "yyyy-MM-dd HH:mm:ss.ffffff")] |
|
16 |
public DateTime TimeStamp { get; set; } |
|
17 |
|
|
18 |
[JsonPropertyName("head_device")] |
|
19 |
public DebuggerInfo HeadDevice { get; set; } |
|
20 |
|
|
21 |
|
|
22 |
[JsonPropertyName("body_device")] |
|
23 |
public DebuggerInfo BodyDevice { get; set; } |
|
24 |
|
|
25 |
[JsonPropertyName("status")] |
|
26 |
//[Newtonsoft.Json.JsonConverter(typeof(StringEnumConverter))] |
|
27 |
public ConnectionStatus Status { get; set; } |
|
28 |
} |
|
29 |
} |
Také k dispozici: Unified diff
re #9438 Added api data definition