Packed and Unpacked parsing allow for all repeated, per 2.3

pull/288/head
csharptest 14 years ago committed by rogerk
parent 17699c21f9
commit 6da3170a95
  1. 21
      protos/google/protobuf/unittest.proto
  2. 7
      src/ProtoGen/MessageGenerator.cs
  3. 10
      src/ProtoGen/ProtoGen.csproj
  4. 39
      src/ProtocolBuffers.Test/AbstractMessageTest.cs
  5. 3
      src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSpeedProtoFile.cs
  6. 744
      src/ProtocolBuffers.Test/TestProtos/UnitTestProtoFile.cs
  7. 3
      src/ProtocolBuffers.Test/TestProtos/UnitTestXmlSerializerTestProtoFile.cs
  8. 96
      src/ProtocolBuffers.Test/TestUtil.cs
  9. 25
      src/ProtocolBuffers/ExtendableBuilderLite.cs
  10. 17
      src/ProtocolBuffers/UnknownFieldSet.cs
  11. 3
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasLiteProtoFile.cs
  12. 58
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteProtoFile.cs
  13. 744
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestProtoFile.cs

@ -563,6 +563,27 @@ extend TestPackedExtensions {
repeated ForeignEnum packed_enum_extension = 103 [packed = true];
}
message TestUnpackedExtensions {
extensions 1 to max;
}
extend TestUnpackedExtensions {
repeated int32 unpacked_int32_extension = 90;
repeated int64 unpacked_int64_extension = 91;
repeated uint32 unpacked_uint32_extension = 92;
repeated uint64 unpacked_uint64_extension = 93;
repeated sint32 unpacked_sint32_extension = 94;
repeated sint64 unpacked_sint64_extension = 95;
repeated fixed32 unpacked_fixed32_extension = 96;
repeated fixed64 unpacked_fixed64_extension = 97;
repeated sfixed32 unpacked_sfixed32_extension = 98;
repeated sfixed64 unpacked_sfixed64_extension = 99;
repeated float unpacked_float_extension = 100;
repeated double unpacked_double_extension = 101;
repeated bool unpacked_bool_extension = 102;
repeated ForeignEnum unpacked_enum_extension = 103;
}
// Used by ExtensionSetTest/DynamicExtensions. The test actually builds
// a set of extensions to TestAllExtensions dynamically, based on the fields
// of this message type.

@ -653,7 +653,12 @@ namespace Google.ProtocolBuffers.ProtoGen
writer.WriteLine("}");
foreach (FieldDescriptor field in sortedFields)
{
uint tag = WireFormat.MakeTag(field);
WireFormat.WireType wt = WireFormat.GetWireType(field.FieldType);
uint tag = WireFormat.MakeTag(field.FieldNumber, wt);
if(field.IsRepeated && (wt == WireFormat.WireType.Varint || wt == WireFormat.WireType.Fixed32 || wt == WireFormat.WireType.Fixed64))
writer.WriteLine("case {0}:", WireFormat.MakeTag(field.FieldNumber, WireFormat.WireType.LengthDelimited));
writer.WriteLine("case {0}: {{", tag);
writer.Indent();
SourceGenerators.CreateFieldGenerator(field).GenerateParsingCode(writer);

@ -56,6 +56,10 @@
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.ProtocolBuffers, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\build\2.3.0.304\Google.ProtocolBuffers.dll</HintPath>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Data" />
@ -92,12 +96,6 @@
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.csproj">
<Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
<Name>ProtocolBuffers</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>

@ -36,6 +36,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using Google.ProtocolBuffers.Descriptors;
using NUnit.Framework;
using Google.ProtocolBuffers.TestProtos;
@ -100,7 +101,43 @@ namespace Google.ProtocolBuffers
{
AbstractMessageWrapper.Builder builder = new AbstractMessageWrapper.Builder(TestPackedTypes.CreateBuilder());
AbstractMessageWrapper message = builder.MergeFrom(TestUtil.GetPackedSet().ToByteString()).Build();
TestUtil.AssertPackedFieldsSet((TestPackedTypes) message.WrappedMessage);
TestUtil.AssertPackedFieldsSet((TestPackedTypes)message.WrappedMessage);
}
[Test]
public void UnpackedParsingOfPackedInput()
{
byte[] bytes = TestUtil.GetPackedSet().ToByteArray();
TestUnpackedTypes message = TestUnpackedTypes.ParseFrom(bytes);
TestUtil.AssertUnpackedFieldsSet(message);
}
[Test]
public void PackedParsingOfUnpackedInput()
{
byte[] bytes = TestUnpackedTypes.ParseFrom(TestUtil.GetPackedSet().ToByteArray()).ToByteArray();
TestPackedTypes message = TestPackedTypes.ParseFrom(bytes);
TestUtil.AssertPackedFieldsSet(message);
}
[Test]
public void UnpackedParsingOfPackedInputExtensions()
{
byte[] bytes = TestUtil.GetPackedSet().ToByteArray();
ExtensionRegistry registry = ExtensionRegistry.CreateInstance();
UnitTestProtoFile.RegisterAllExtensions(registry);
TestUnpackedExtensions message = TestUnpackedExtensions.ParseFrom(bytes, registry);
TestUtil.AssertUnpackedExtensionsSet(message);
}
[Test]
public void PackedParsingOfUnpackedInputExtensions()
{
byte[] bytes = TestUnpackedTypes.ParseFrom(TestUtil.GetPackedSet().ToByteArray()).ToByteArray();
ExtensionRegistry registry = ExtensionRegistry.CreateInstance();
UnitTestProtoFile.RegisterAllExtensions(registry);
TestPackedExtensions message = TestPackedExtensions.ParseFrom(bytes, registry);
TestUtil.AssertPackedExtensionsSet(message);
}
[Test]

@ -1105,6 +1105,7 @@ namespace Google.ProtocolBuffers.TestProtos {
result.hasField4 |= input.ReadString(ref result.field4_);
break;
}
case 42:
case 41: {
input.ReadPrimitiveArray(pbd::FieldType.Fixed64, tag, field_name, result.field5_);
break;
@ -3661,6 +3662,7 @@ namespace Google.ProtocolBuffers.TestProtos {
Field31 = subBuilder.BuildPartial();
break;
}
case 586:
case 584: {
input.ReadPrimitiveArray(pbd::FieldType.Int32, tag, field_name, result.field73_);
break;
@ -4829,6 +4831,7 @@ namespace Google.ProtocolBuffers.TestProtos {
result.hasField129 |= input.ReadInt32(ref result.field129_);
break;
}
case 1042:
case 1040: {
input.ReadPrimitiveArray(pbd::FieldType.Int64, tag, field_name, result.field130_);
break;

File diff suppressed because it is too large Load Diff

@ -340,6 +340,7 @@ namespace Google.ProtocolBuffers.TestProtos {
ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
break;
}
case 26:
case 24: {
scg::ICollection<object> unknownItems;
input.ReadEnumArray<global::Google.ProtocolBuffers.TestProtos.EnumOptions>(tag, field_name, result.options_, out unknownItems);
@ -846,6 +847,7 @@ namespace Google.ProtocolBuffers.TestProtos {
ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
break;
}
case 26:
case 24: {
scg::ICollection<object> unknownItems;
input.ReadEnumArray<global::Google.ProtocolBuffers.TestProtos.EnumOptions>(tag, field_name, result.options_, out unknownItems);
@ -1235,6 +1237,7 @@ namespace Google.ProtocolBuffers.TestProtos {
Child = subBuilder.BuildPartial();
break;
}
case 18:
case 16: {
input.ReadPrimitiveArray(pbd::FieldType.Int32, tag, field_name, result.numbers_);
break;

@ -1558,6 +1558,55 @@ namespace Google.ProtocolBuffers
Assert.AreEqual(false, message.GetPackedBool(1));
Assert.AreEqual(ForeignEnum.FOREIGN_BAZ, message.GetPackedEnum(1));
}
/// <summary>
/// Asserts that all the fields of the specified message are set to the values assigned
/// in SetPackedFields.
/// </summary>
public static void AssertUnpackedFieldsSet(TestUnpackedTypes message)
{
Assert.AreEqual(2, message.UnpackedInt32Count);
Assert.AreEqual(2, message.UnpackedInt64Count);
Assert.AreEqual(2, message.UnpackedUint32Count);
Assert.AreEqual(2, message.UnpackedUint64Count);
Assert.AreEqual(2, message.UnpackedSint32Count);
Assert.AreEqual(2, message.UnpackedSint64Count);
Assert.AreEqual(2, message.UnpackedFixed32Count);
Assert.AreEqual(2, message.UnpackedFixed64Count);
Assert.AreEqual(2, message.UnpackedSfixed32Count);
Assert.AreEqual(2, message.UnpackedSfixed64Count);
Assert.AreEqual(2, message.UnpackedFloatCount);
Assert.AreEqual(2, message.UnpackedDoubleCount);
Assert.AreEqual(2, message.UnpackedBoolCount);
Assert.AreEqual(2, message.UnpackedEnumCount);
Assert.AreEqual(601, message.GetUnpackedInt32(0));
Assert.AreEqual(602, message.GetUnpackedInt64(0));
Assert.AreEqual(603, message.GetUnpackedUint32(0));
Assert.AreEqual(604, message.GetUnpackedUint64(0));
Assert.AreEqual(605, message.GetUnpackedSint32(0));
Assert.AreEqual(606, message.GetUnpackedSint64(0));
Assert.AreEqual(607, message.GetUnpackedFixed32(0));
Assert.AreEqual(608, message.GetUnpackedFixed64(0));
Assert.AreEqual(609, message.GetUnpackedSfixed32(0));
Assert.AreEqual(610, message.GetUnpackedSfixed64(0));
Assert.AreEqual(611, message.GetUnpackedFloat(0), 0.0);
Assert.AreEqual(612, message.GetUnpackedDouble(0), 0.0);
Assert.AreEqual(true, message.GetUnpackedBool(0));
Assert.AreEqual(ForeignEnum.FOREIGN_BAR, message.GetUnpackedEnum(0));
Assert.AreEqual(701, message.GetUnpackedInt32(1));
Assert.AreEqual(702, message.GetUnpackedInt64(1));
Assert.AreEqual(703, message.GetUnpackedUint32(1));
Assert.AreEqual(704, message.GetUnpackedUint64(1));
Assert.AreEqual(705, message.GetUnpackedSint32(1));
Assert.AreEqual(706, message.GetUnpackedSint64(1));
Assert.AreEqual(707, message.GetUnpackedFixed32(1));
Assert.AreEqual(708, message.GetUnpackedFixed64(1));
Assert.AreEqual(709, message.GetUnpackedSfixed32(1));
Assert.AreEqual(710, message.GetUnpackedSfixed64(1));
Assert.AreEqual(711, message.GetUnpackedFloat(1), 0.0);
Assert.AreEqual(712, message.GetUnpackedDouble(1), 0.0);
Assert.AreEqual(false, message.GetUnpackedBool(1));
Assert.AreEqual(ForeignEnum.FOREIGN_BAZ, message.GetUnpackedEnum(1));
}
public static void SetPackedExtensions(TestPackedExtensions.Builder message)
{
@ -1639,6 +1688,53 @@ namespace Google.ProtocolBuffers
Assert.AreEqual(ForeignEnum.FOREIGN_BAZ, message.GetExtension(UnitTestProtoFile.PackedEnumExtension, 1));
}
public static void AssertUnpackedExtensionsSet(TestUnpackedExtensions message)
{
Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedInt32Extension));
Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedInt64Extension));
Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedUint32Extension));
Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedUint64Extension));
Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedSint32Extension));
Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedSint64Extension));
Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedFixed32Extension));
Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedFixed64Extension));
Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedSfixed32Extension));
Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedSfixed64Extension));
Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedFloatExtension));
Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedDoubleExtension));
Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedBoolExtension));
Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedEnumExtension));
Assert.AreEqual(601, message.GetExtension(UnitTestProtoFile.UnpackedInt32Extension, 0));
Assert.AreEqual(602L, message.GetExtension(UnitTestProtoFile.UnpackedInt64Extension, 0));
Assert.AreEqual(603, message.GetExtension(UnitTestProtoFile.UnpackedUint32Extension, 0));
Assert.AreEqual(604L, message.GetExtension(UnitTestProtoFile.UnpackedUint64Extension, 0));
Assert.AreEqual(605, message.GetExtension(UnitTestProtoFile.UnpackedSint32Extension, 0));
Assert.AreEqual(606L, message.GetExtension(UnitTestProtoFile.UnpackedSint64Extension, 0));
Assert.AreEqual(607, message.GetExtension(UnitTestProtoFile.UnpackedFixed32Extension, 0));
Assert.AreEqual(608L, message.GetExtension(UnitTestProtoFile.UnpackedFixed64Extension, 0));
Assert.AreEqual(609, message.GetExtension(UnitTestProtoFile.UnpackedSfixed32Extension, 0));
Assert.AreEqual(610L, message.GetExtension(UnitTestProtoFile.UnpackedSfixed64Extension, 0));
Assert.AreEqual(611F, message.GetExtension(UnitTestProtoFile.UnpackedFloatExtension, 0));
Assert.AreEqual(612D, message.GetExtension(UnitTestProtoFile.UnpackedDoubleExtension, 0));
Assert.AreEqual(true, message.GetExtension(UnitTestProtoFile.UnpackedBoolExtension, 0));
Assert.AreEqual(ForeignEnum.FOREIGN_BAR,
message.GetExtension(UnitTestProtoFile.UnpackedEnumExtension, 0));
Assert.AreEqual(701, message.GetExtension(UnitTestProtoFile.UnpackedInt32Extension, 1));
Assert.AreEqual(702L, message.GetExtension(UnitTestProtoFile.UnpackedInt64Extension, 1));
Assert.AreEqual(703, message.GetExtension(UnitTestProtoFile.UnpackedUint32Extension, 1));
Assert.AreEqual(704L, message.GetExtension(UnitTestProtoFile.UnpackedUint64Extension, 1));
Assert.AreEqual(705, message.GetExtension(UnitTestProtoFile.UnpackedSint32Extension, 1));
Assert.AreEqual(706L, message.GetExtension(UnitTestProtoFile.UnpackedSint64Extension, 1));
Assert.AreEqual(707, message.GetExtension(UnitTestProtoFile.UnpackedFixed32Extension, 1));
Assert.AreEqual(708L, message.GetExtension(UnitTestProtoFile.UnpackedFixed64Extension, 1));
Assert.AreEqual(709, message.GetExtension(UnitTestProtoFile.UnpackedSfixed32Extension, 1));
Assert.AreEqual(710L, message.GetExtension(UnitTestProtoFile.UnpackedSfixed64Extension, 1));
Assert.AreEqual(711F, message.GetExtension(UnitTestProtoFile.UnpackedFloatExtension, 1));
Assert.AreEqual(712D, message.GetExtension(UnitTestProtoFile.UnpackedDoubleExtension, 1));
Assert.AreEqual(false, message.GetExtension(UnitTestProtoFile.UnpackedBoolExtension, 1));
Assert.AreEqual(ForeignEnum.FOREIGN_BAZ, message.GetExtension(UnitTestProtoFile.UnpackedEnumExtension, 1));
}
private static ByteString goldenPackedFieldsMessage = null;
/// <summary>

@ -146,6 +146,31 @@ namespace Google.ProtocolBuffers
return input.SkipField();
IFieldDescriptorLite field = extension.Descriptor;
// Unknown field or wrong wire type. Skip.
if (field == null)
{
return input.SkipField();
}
WireFormat.WireType expectedType = field.IsPacked
? WireFormat.WireType.LengthDelimited
: WireFormat.GetWireType(field.FieldType);
if (wireType != expectedType)
{
expectedType = WireFormat.GetWireType(field.FieldType);
if (wireType == expectedType)
{
//Allowed as of 2.3, this is unpacked data for a packed array
}
else if (field.IsRepeated && wireType == WireFormat.WireType.LengthDelimited &&
(expectedType == WireFormat.WireType.Varint || expectedType == WireFormat.WireType.Fixed32 || expectedType == WireFormat.WireType.Fixed64))
{
//Allowed as of 2.3, this is packed data for an unpacked array
}
else
return input.SkipField();
}
if (!field.IsRepeated && wireType != WireFormat.GetWireType(field.FieldType)) //invalid wire type
return input.SkipField();

@ -666,10 +666,25 @@ namespace Google.ProtocolBuffers
}
// Unknown field or wrong wire type. Skip.
if (field == null || wireType != WireFormat.GetWireType(field))
if (field == null)
{
return MergeFieldFrom(tag, input);
}
if (wireType != WireFormat.GetWireType(field))
{
WireFormat.WireType expectedType = WireFormat.GetWireType(field.FieldType);
if (wireType == expectedType)
{
//Allowed as of 2.3, this is unpacked data for a packed array
}
else if (field.IsRepeated && wireType == WireFormat.WireType.LengthDelimited &&
(expectedType == WireFormat.WireType.Varint || expectedType == WireFormat.WireType.Fixed32 || expectedType == WireFormat.WireType.Fixed64))
{
//Allowed as of 2.3, this is packed data for an unpacked array
}
else
return MergeFieldFrom(tag, input);
}
switch (field.FieldType)
{

@ -1364,7 +1364,8 @@ namespace Google.ProtocolBuffers.TestProtos {
input.ReadGroupArray(tag, field_name, result.addresses_, global::Google.ProtocolBuffers.TestProtos.TestInteropPersonLite.Types.Addresses.DefaultInstance, extensionRegistry);
break;
}
case 82: {
case 82:
case 80: {
input.ReadPrimitiveArray(pbd::FieldType.Int32, tag, field_name, result.codes_);
break;
}

@ -3758,54 +3758,67 @@ namespace Google.ProtocolBuffers.TestProtos {
result.hasOptionalCord |= input.ReadString(ref result.optionalCord_);
break;
}
case 250:
case 248: {
input.ReadPrimitiveArray(pbd::FieldType.Int32, tag, field_name, result.repeatedInt32_);
break;
}
case 258:
case 256: {
input.ReadPrimitiveArray(pbd::FieldType.Int64, tag, field_name, result.repeatedInt64_);
break;
}
case 266:
case 264: {
input.ReadPrimitiveArray(pbd::FieldType.UInt32, tag, field_name, result.repeatedUint32_);
break;
}
case 274:
case 272: {
input.ReadPrimitiveArray(pbd::FieldType.UInt64, tag, field_name, result.repeatedUint64_);
break;
}
case 282:
case 280: {
input.ReadPrimitiveArray(pbd::FieldType.SInt32, tag, field_name, result.repeatedSint32_);
break;
}
case 290:
case 288: {
input.ReadPrimitiveArray(pbd::FieldType.SInt64, tag, field_name, result.repeatedSint64_);
break;
}
case 298:
case 301: {
input.ReadPrimitiveArray(pbd::FieldType.Fixed32, tag, field_name, result.repeatedFixed32_);
break;
}
case 306:
case 305: {
input.ReadPrimitiveArray(pbd::FieldType.Fixed64, tag, field_name, result.repeatedFixed64_);
break;
}
case 314:
case 317: {
input.ReadPrimitiveArray(pbd::FieldType.SFixed32, tag, field_name, result.repeatedSfixed32_);
break;
}
case 322:
case 321: {
input.ReadPrimitiveArray(pbd::FieldType.SFixed64, tag, field_name, result.repeatedSfixed64_);
break;
}
case 330:
case 333: {
input.ReadPrimitiveArray(pbd::FieldType.Float, tag, field_name, result.repeatedFloat_);
break;
}
case 338:
case 337: {
input.ReadPrimitiveArray(pbd::FieldType.Double, tag, field_name, result.repeatedDouble_);
break;
}
case 346:
case 344: {
input.ReadPrimitiveArray(pbd::FieldType.Bool, tag, field_name, result.repeatedBool_);
break;
@ -3834,16 +3847,19 @@ namespace Google.ProtocolBuffers.TestProtos {
input.ReadMessageArray(tag, field_name, result.repeatedImportMessage_, global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.DefaultInstance, extensionRegistry);
break;
}
case 410:
case 408: {
scg::ICollection<object> unknownItems;
input.ReadEnumArray<global::Google.ProtocolBuffers.TestProtos.TestAllTypesLite.Types.NestedEnum>(tag, field_name, result.repeatedNestedEnum_, out unknownItems);
break;
}
case 418:
case 416: {
scg::ICollection<object> unknownItems;
input.ReadEnumArray<global::Google.ProtocolBuffers.TestProtos.ForeignEnumLite>(tag, field_name, result.repeatedForeignEnum_, out unknownItems);
break;
}
case 426:
case 424: {
scg::ICollection<object> unknownItems;
input.ReadEnumArray<global::Google.ProtocolBuffers.TestProtos.ImportEnumLite>(tag, field_name, result.repeatedImportEnum_, out unknownItems);
@ -6442,59 +6458,73 @@ namespace Google.ProtocolBuffers.TestProtos {
ParseUnknownField(input, extensionRegistry, tag, field_name);
break;
}
case 722: {
case 722:
case 720: {
input.ReadPrimitiveArray(pbd::FieldType.Int32, tag, field_name, result.packedInt32_);
break;
}
case 730: {
case 730:
case 728: {
input.ReadPrimitiveArray(pbd::FieldType.Int64, tag, field_name, result.packedInt64_);
break;
}
case 738: {
case 738:
case 736: {
input.ReadPrimitiveArray(pbd::FieldType.UInt32, tag, field_name, result.packedUint32_);
break;
}
case 746: {
case 746:
case 744: {
input.ReadPrimitiveArray(pbd::FieldType.UInt64, tag, field_name, result.packedUint64_);
break;
}
case 754: {
case 754:
case 752: {
input.ReadPrimitiveArray(pbd::FieldType.SInt32, tag, field_name, result.packedSint32_);
break;
}
case 762: {
case 762:
case 760: {
input.ReadPrimitiveArray(pbd::FieldType.SInt64, tag, field_name, result.packedSint64_);
break;
}
case 770: {
case 770:
case 773: {
input.ReadPrimitiveArray(pbd::FieldType.Fixed32, tag, field_name, result.packedFixed32_);
break;
}
case 778: {
case 778:
case 777: {
input.ReadPrimitiveArray(pbd::FieldType.Fixed64, tag, field_name, result.packedFixed64_);
break;
}
case 786: {
case 786:
case 789: {
input.ReadPrimitiveArray(pbd::FieldType.SFixed32, tag, field_name, result.packedSfixed32_);
break;
}
case 794: {
case 794:
case 793: {
input.ReadPrimitiveArray(pbd::FieldType.SFixed64, tag, field_name, result.packedSfixed64_);
break;
}
case 802: {
case 802:
case 805: {
input.ReadPrimitiveArray(pbd::FieldType.Float, tag, field_name, result.packedFloat_);
break;
}
case 810: {
case 810:
case 809: {
input.ReadPrimitiveArray(pbd::FieldType.Double, tag, field_name, result.packedDouble_);
break;
}
case 818: {
case 818:
case 816: {
input.ReadPrimitiveArray(pbd::FieldType.Bool, tag, field_name, result.packedBool_);
break;
}
case 826: {
case 826:
case 824: {
scg::ICollection<object> unknownItems;
input.ReadEnumArray<global::Google.ProtocolBuffers.TestProtos.ForeignEnumLite>(tag, field_name, result.packedEnum_, out unknownItems);
break;

Loading…
Cancel
Save