diff options
author | Jon Skeet <jonskeet@google.com> | 2015-08-06 11:40:43 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2015-08-06 11:40:43 +0100 |
commit | 5bdc57292f2a21706ff1dab21652fb8e1f058eb7 (patch) | |
tree | c313720a0b955c6d24f68a3a3d770c0a3eb0f556 /csharp/src/Google.Protobuf | |
parent | e7f88ff1294ada0fca19334ed2c844cdb98ea2f6 (diff) |
Generated code for previous commit.
Diffstat (limited to 'csharp/src/Google.Protobuf')
12 files changed, 53 insertions, 188 deletions
diff --git a/csharp/src/Google.Protobuf/InvalidProtocolBufferException.cs b/csharp/src/Google.Protobuf/InvalidProtocolBufferException.cs index 6905a6a3..01d55395 100644 --- a/csharp/src/Google.Protobuf/InvalidProtocolBufferException.cs +++ b/csharp/src/Google.Protobuf/InvalidProtocolBufferException.cs @@ -45,6 +45,12 @@ namespace Google.Protobuf {
}
+ internal static InvalidProtocolBufferException MoreDataAvailable()
+ {
+ return new InvalidProtocolBufferException(
+ "Completed reading a message while more data was available in the stream.");
+ }
+
internal static InvalidProtocolBufferException TruncatedMessage()
{
return new InvalidProtocolBufferException(
diff --git a/csharp/src/Google.Protobuf/Reflection/DescriptorProtoFile.cs b/csharp/src/Google.Protobuf/Reflection/DescriptorProtoFile.cs index d66bdb80..59c5e69b 100644 --- a/csharp/src/Google.Protobuf/Reflection/DescriptorProtoFile.cs +++ b/csharp/src/Google.Protobuf/Reflection/DescriptorProtoFile.cs @@ -242,10 +242,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { file_.AddEntriesFrom(input, _repeated_file_codec); @@ -539,10 +536,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { Name = input.ReadString(); @@ -833,10 +827,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { Name = input.ReadString(); @@ -1000,10 +991,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 8: { Start = input.ReadInt32(); @@ -1131,10 +1119,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 8: { Start = input.ReadInt32(); @@ -1424,10 +1409,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { Name = input.ReadString(); @@ -1597,10 +1579,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { Name = input.ReadString(); @@ -1741,10 +1720,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { Name = input.ReadString(); @@ -1904,10 +1880,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { Name = input.ReadString(); @@ -2059,10 +2032,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { Name = input.ReadString(); @@ -2288,10 +2258,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { Name = input.ReadString(); @@ -2716,10 +2683,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { JavaPackage = input.ReadString(); @@ -2969,10 +2933,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 8: { MessageSetWireFormat = input.ReadBool(); @@ -3214,10 +3175,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 8: { ctype_ = (global::Google.Protobuf.Reflection.FieldOptions.Types.CType) input.ReadEnum(); @@ -3397,10 +3355,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 16: { AllowAlias = input.ReadBool(); @@ -3524,10 +3479,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 8: { Deprecated = input.ReadBool(); @@ -3647,10 +3599,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 264: { Deprecated = input.ReadBool(); @@ -3770,10 +3719,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 264: { Deprecated = input.ReadBool(); @@ -4003,10 +3949,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 18: { name_.AddEntriesFrom(input, _repeated_name_codec); @@ -4155,10 +4098,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { NamePart_ = input.ReadString(); @@ -4261,10 +4201,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { location_.AddEntriesFrom(input, _repeated_location_codec); @@ -4431,10 +4368,7 @@ namespace Google.Protobuf.Reflection { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: case 8: { diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs index 9fc653b0..204b37cf 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs @@ -150,10 +150,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { TypeUrl = input.ReadString(); diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs index 8a94e7b0..a5f95093 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs @@ -213,10 +213,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { Name = input.ReadString(); @@ -439,10 +436,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { Name = input.ReadString(); diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs index d74636d4..aa34f2d8 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs @@ -151,10 +151,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 8: { Seconds = input.ReadInt64(); diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs index 0f1d7f50..7d699c1d 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs @@ -106,10 +106,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; } } diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs b/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs index 9bd47a96..0dac4403 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs @@ -120,10 +120,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { paths_.AddEntriesFrom(input, _repeated_paths_codec); diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs b/csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs index ae79884f..8347999d 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs @@ -129,10 +129,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { FileName = input.ReadString(); diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs index ea8b1055..1e8a8236 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs @@ -139,10 +139,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { fields_.AddEntriesFrom(input, _map_fields_codec); @@ -392,10 +389,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 8: { kind_ = input.ReadEnum(); @@ -520,10 +514,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { values_.AddEntriesFrom(input, _repeated_values_codec); diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs index 89355bdc..d7c0954f 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs @@ -151,10 +151,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 8: { Seconds = input.ReadInt64(); diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs index 36116a65..ff2ecc57 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs @@ -226,10 +226,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { Name = input.ReadString(); @@ -496,10 +493,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 8: { kind_ = (global::Google.Protobuf.WellKnownTypes.Field.Types.Kind) input.ReadEnum(); @@ -716,10 +710,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { Name = input.ReadString(); @@ -872,10 +863,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { Name = input.ReadString(); @@ -1010,10 +998,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { Name = input.ReadString(); diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs index 19ed599d..9ecaf47c 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs @@ -138,10 +138,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 9: { Value = input.ReadDouble(); @@ -243,10 +240,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 13: { Value = input.ReadFloat(); @@ -348,10 +342,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 8: { Value = input.ReadInt64(); @@ -453,10 +444,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 8: { Value = input.ReadUInt64(); @@ -558,10 +546,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 8: { Value = input.ReadInt32(); @@ -663,10 +648,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 8: { Value = input.ReadUInt32(); @@ -768,10 +750,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 8: { Value = input.ReadBool(); @@ -873,10 +852,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { Value = input.ReadString(); @@ -978,10 +954,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - if (pb::WireFormat.IsEndGroupTag(tag)) { - return; - } - input.ConsumeLastField(); + input.SkipLastField(); break; case 10: { Value = input.ReadBytes(); |