Initial commit
This commit is contained in:
26
ProtoJsonRegistry.cs
Normal file
26
ProtoJsonRegistry.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Google.Protobuf;
|
||||
|
||||
namespace DynamicProtobuf.Runtime;
|
||||
|
||||
public class ProtoJsonRegistry
|
||||
{
|
||||
[JsonPropertyName("messages")]
|
||||
public Dictionary<string, Dictionary<string, MessageField>> Messages { get; set; } = [];
|
||||
|
||||
[JsonPropertyName("command_ids")]
|
||||
public Dictionary<string, ushort>? CommandIds { get; set; }
|
||||
}
|
||||
|
||||
public class MessageField
|
||||
{
|
||||
[JsonPropertyName("field_number")]
|
||||
public int FieldNumber { get; set; }
|
||||
|
||||
[JsonPropertyName("wire_type")]
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public WireFormat.WireType WireType { get; set; }
|
||||
|
||||
[JsonPropertyName("xor_const")]
|
||||
public uint? XorConst { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user