aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp/src
diff options
context:
space:
mode:
authorGravatar Yilun Chong <yilunchong@google.com>2017-06-29 15:04:50 -0700
committerGravatar Yilun Chong <yilunchong@google.com>2017-06-29 15:04:50 -0700
commita7d5be6a910caabc4b26d73bc5c369dbc638c4c3 (patch)
treeec2052388041b773c2565a18eccef1fa3dbf7dec /csharp/src
parentfcb926825537c214ef7ce40f742aca905345f958 (diff)
change php objc nodejs csharp ruby
Diffstat (limited to 'csharp/src')
-rw-r--r--csharp/src/Google.Protobuf.Conformance/Program.cs31
1 files changed, 15 insertions, 16 deletions
diff --git a/csharp/src/Google.Protobuf.Conformance/Program.cs b/csharp/src/Google.Protobuf.Conformance/Program.cs
index 76b21e39..2f30036c 100644
--- a/csharp/src/Google.Protobuf.Conformance/Program.cs
+++ b/csharp/src/Google.Protobuf.Conformance/Program.cs
@@ -91,22 +91,21 @@ namespace Google.Protobuf.Conformance
message = parser.Parse<ProtobufTestMessages.Proto3.TestAllTypes>(request.JsonPayload);
break;
case ConformanceRequest.PayloadOneofCase.ProtobufPayload:
- {
- if (request.MessageType.Equals("proto3"))
- {
- message = ProtobufTestMessages.Proto3.TestAllTypes.Parser.ParseFrom(request.ProtobufPayload);
- }
- else if (request.MessageType.Equals("proto2"))
- {
-
- return new ConformanceResponse { Skipped = "CSharp doesn't support proto2" };
- }
- else
- {
- throw new Exception(" Protobuf request doesn't have specific payload type");
- }
- break;
- }
+ {
+ if (request.MessageType.Equals("protobuf_test_messages.proto3.TestAllTypes"))
+ {
+ message = ProtobufTestMessages.Proto3.TestAllTypes.Parser.ParseFrom(request.ProtobufPayload);
+ }
+ else if (request.MessageType.Equals("protobuf_test_messages.proto2.TestAllTypesProto2"))
+ {
+ return new ConformanceResponse { Skipped = "CSharp doesn't support proto2" };
+ }
+ else
+ {
+ throw new Exception(" Protobuf request doesn't have specific payload type");
+ }
+ break;
+ }
default:
throw new Exception("Unsupported request payload: " + request.PayloadCase);
}