-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathUEContext.cs
42 lines (35 loc) · 960 Bytes
/
UEContext.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
namespace KismetAnalyzer;
using Newtonsoft.Json;
public class UEContext {
[JsonProperty("classes")]
public Dictionary<string, UEClass> Classes { get; init; }
public static UEContext FromFile(string path) {
using (StreamReader r = new StreamReader(path)) {
return JsonConvert.DeserializeObject<UEContext>(r.ReadToEnd());
}
}
}
public class UEClass {
[JsonProperty("functions")]
public Dictionary<string, UEFunction> Functions { get; init; }
}
public class UEFunction {
[JsonProperty("pure")]
public bool Pure;
[JsonProperty("pins")]
public IEnumerable<UEPin> Pins { get; init; }
}
public class UEPin {
[JsonProperty("name")]
public string Name;
[JsonProperty("isRef")]
public bool IsRef;
[JsonProperty("direction")]
public UEPinDirection Direction;
}
public enum UEPinDirection {
[JsonProperty("input")]
Input,
[JsonProperty("output")]
Output,
}