edjournal/DockedEntry.cs

21 lines
744 B
C#

using Newtonsoft.Json.Linq;
namespace EDJournal {
public class DockedEntry : Entry {
public string StationName { get; set; }
public string StarSystem { get; set; }
public ulong SystemAddress { get; set; }
public string StationFaction { get; set; }
protected override void Initialise() {
StationName = JSON.Value<string>("StationName") ?? "";
StarSystem = JSON.Value<string>("StarSystem") ?? "";
SystemAddress = JSON.Value<ulong?>("SystemAddress") ?? 0;
JObject faction = JSON.Value<JObject>("StationFaction");
if (faction != null) {
StationFaction = faction.Value<string>("Name") ?? "";
}
}
}
}