26 lines
695 B
C#
26 lines
695 B
C#
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; }
|
|
} |