You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// This represents protobuf types when they are handled by the C# code.
12
+
/// copy-pasted from https://github.com/protocolbuffers/protobuf/blob/main/csharp/src/Google.Protobuf/Reflection/FieldType.cs
13
+
/// </summary>
14
+
internalenumProtobufDotnetFieldType
15
+
{
16
+
Double,
17
+
Float,
18
+
Int64,
19
+
UInt64,
20
+
Int32,
21
+
Fixed64,
22
+
Fixed32,
23
+
Bool,
24
+
String,
25
+
Group,
26
+
Message,
27
+
Bytes,
28
+
UInt32,
29
+
SFixed32,
30
+
SFixed64,
31
+
SInt32,
32
+
SInt64,
33
+
Enum
34
+
}
35
+
36
+
/// <summary>
37
+
/// This is the definition of types common to all languages.
38
+
/// copy pasted from https://github.com/protocolbuffers/protobuf/blob/78db3094a46e7a8cc34d207808b8008997b5fc82/csharp/src/Google.Protobuf/Reflection/Descriptor.pb.cs#L3962
39
+
/// </summary>
40
+
internalenumProtobufDotnetProtoType
41
+
{
42
+
Double=1,
43
+
Float=2,
44
+
Int64=3,
45
+
Uint64=4,
46
+
Int32=5,
47
+
Fixed64=6,
48
+
Fixed32=7,
49
+
Bool=8,
50
+
String=9,
51
+
Group=10,
52
+
Message=11,
53
+
Bytes=12,
54
+
Uint32=13,
55
+
Enum=14,
56
+
Sfixed32=15,
57
+
Sfixed64=16,
58
+
Sint32=17,
59
+
Sint64=18,
60
+
Unknown=999// this one I added myself, to avoid using exceptions
61
+
}
62
+
63
+
/// <summary> Just a class to host the extension method. Must match the name of the file. </summary>
64
+
internalstaticclassProtobufTypes
65
+
{
66
+
/// <summary>
67
+
/// Converts from the dotnet-specific enum to the common enum.
68
+
/// this is the opposite of this function https://github.com/protocolbuffers/protobuf/blob/78db3094a46e7a8cc34d207808b8008997b5fc82/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs#L206
0 commit comments