C3/Src/WebController/Backend/Comms/GatewayRequests/NewBuild.cs

34 lines
880 B
C#
Raw Normal View History

2020-03-05 15:30:50 +00:00
using FSecure.C3.WebController.Models;
2019-09-02 10:28:14 +00:00
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
2020-03-05 15:30:50 +00:00
namespace FSecure.C3.WebController.Comms.GatewayRequests
2019-09-02 10:28:14 +00:00
{
public class NewBuild
{
public ulong BuildId { get; set; }
public JToken Command { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
public Build.Architecture Arch { get; set; }
public NewBuild(RelayBuild relayBuild)
{
BuildId = relayBuild.BuildId;
Command = relayBuild.StartupCommands[0].ToObject<Command>().Data;
Arch = relayBuild.Arch;
}
public NewBuild(ulong buildId, JToken command)
{
BuildId = buildId;
Command = command;
}
}
}