ce66c5f1b9
This commit includes changes to the C#-specific protos, and rebuilt versions of the "stock" protos. The stock protos have been locally updated to have a specific C# namespace, but this is expected to change soon, so hasn't been committed. Four areas are currently not tested: 1) Serialization - we may restore this at some point, possibly optionally. 2) Services - currently nothing is generated for this; will need to see how it interacts with GRPC 3) Fields beginning with _{digit} - see https://github.com/google/protobuf/issues/308 4) Fields with names which conflict with the declaring type in nasty ways - see https://github.com/google/protobuf/issues/309
54 lines
1.0 KiB
Protocol Buffer
54 lines
1.0 KiB
Protocol Buffer
syntax = "proto2";
|
|
|
|
option csharp_namespace = "Google.ProtocolBuffers.TestProtos";
|
|
|
|
package protobuf_unittest_extra;
|
|
|
|
option optimize_for = SPEED;
|
|
|
|
enum EnumOptions {
|
|
ONE = 0;
|
|
TWO = 1;
|
|
THREE = 2;
|
|
}
|
|
|
|
message TestXmlChild {
|
|
repeated EnumOptions options = 3;
|
|
optional bytes binary = 4;
|
|
}
|
|
|
|
message TestXmlNoFields {
|
|
}
|
|
|
|
message TestXmlRescursive {
|
|
optional TestXmlRescursive child = 1;
|
|
}
|
|
|
|
message TestXmlMessage {
|
|
|
|
optional int64 number = 6;
|
|
repeated int32 numbers = 2;
|
|
optional string text = 3;
|
|
repeated string textlines = 700;
|
|
optional bool valid = 5;
|
|
|
|
optional TestXmlChild child = 1;
|
|
repeated group Children = 401 {
|
|
repeated EnumOptions options = 3;
|
|
optional bytes binary = 4;
|
|
}
|
|
|
|
extensions 100 to 199;
|
|
}
|
|
|
|
message TestXmlExtension {
|
|
required int32 number = 1;
|
|
}
|
|
|
|
extend TestXmlMessage {
|
|
optional EnumOptions extension_enum = 101;
|
|
optional string extension_text = 102;
|
|
repeated int32 extension_number = 103 [packed = true];
|
|
optional TestXmlExtension extension_message = 199;
|
|
}
|