Rebuild source for Issue 84 change to code generator

pull/288/head
csharptest 10 years ago committed by rogerk
parent b4bd2e0384
commit 53727a0ac7
  1. 93
      src/AddressBook/AddressBookProtos.cs
  2. 847
      src/ProtoBench/TestProtos/GoogleSpeedProtoFile.cs
  3. 23
      src/ProtoBench/TestProtos/UnitTestImportProtoFile.cs
  4. 2501
      src/ProtoBench/TestProtos/UnitTestProtoFile.cs
  5. 35
      src/ProtocolBuffers.Test/TestProtos/UnitTestCSharpOptionsProtoFile.cs
  6. 477
      src/ProtocolBuffers.Test/TestProtos/UnitTestCustomOptionsProtoFile.cs
  7. 29
      src/ProtocolBuffers.Test/TestProtos/UnitTestEmbedOptimizeForProtoFile.cs
  8. 306
      src/ProtocolBuffers.Test/TestProtos/UnitTestExtrasIssuesProtoFile.cs
  9. 19
      src/ProtocolBuffers.Test/TestProtos/UnitTestExtrasProtoFile.cs
  10. 847
      src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSpeedProtoFile.cs
  11. 21
      src/ProtocolBuffers.Test/TestProtos/UnitTestImportLiteProtoFile.cs
  12. 23
      src/ProtocolBuffers.Test/TestProtos/UnitTestImportProtoFile.cs
  13. 140
      src/ProtocolBuffers.Test/TestProtos/UnitTestMessageSetProtoFile.cs
  14. 25
      src/ProtocolBuffers.Test/TestProtos/UnitTestNoGenericServicesProtoFile.cs
  15. 2501
      src/ProtocolBuffers.Test/TestProtos/UnitTestProtoFile.cs
  16. 120
      src/ProtocolBuffers.Test/TestProtos/UnitTestRpcInterop.cs
  17. 218
      src/ProtocolBuffers.Test/TestProtos/UnitTestXmlSerializerTestProtoFile.cs
  18. 182
      src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs
  19. 828
      src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs
  20. 461
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasLiteProtoFile.cs
  21. 21
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestImportLiteProtoFile.cs
  22. 23
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestImportProtoFile.cs
  23. 21
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteImportNonLiteProtoFile.cs
  24. 1048
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteProtoFile.cs
  25. 2501
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestProtoFile.cs
  26. 112
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestRpcInteropLite.cs

@ -159,7 +159,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _phoneNumberFieldNames; string[] field_names = _phoneNumberFieldNames;
if (hasNumber) { if (hasNumber) {
output.WriteString(1, field_names[0], Number); output.WriteString(1, field_names[0], Number);
@ -175,20 +175,25 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasNumber) {
size += pb::CodedOutputStream.ComputeStringSize(1, Number);
}
if (hasType) {
size += pb::CodedOutputStream.ComputeEnumSize(2, (int) Type);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasNumber) {
size += pb::CodedOutputStream.ComputeStringSize(1, Number);
}
if (hasType) {
size += pb::CodedOutputStream.ComputeEnumSize(2, (int) Type);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static PhoneNumber ParseFrom(pb::ByteString data) { public static PhoneNumber ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -485,7 +490,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _personFieldNames; string[] field_names = _personFieldNames;
if (hasName) { if (hasName) {
output.WriteString(1, field_names[2], Name); output.WriteString(1, field_names[2], Name);
@ -507,26 +512,31 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasName) {
size += pb::CodedOutputStream.ComputeStringSize(1, Name);
}
if (hasId) {
size += pb::CodedOutputStream.ComputeInt32Size(2, Id);
}
if (hasEmail) {
size += pb::CodedOutputStream.ComputeStringSize(3, Email);
}
foreach (global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber element in PhoneList) {
size += pb::CodedOutputStream.ComputeMessageSize(4, element);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasName) {
size += pb::CodedOutputStream.ComputeStringSize(1, Name);
}
if (hasId) {
size += pb::CodedOutputStream.ComputeInt32Size(2, Id);
}
if (hasEmail) {
size += pb::CodedOutputStream.ComputeStringSize(3, Email);
}
foreach (global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber element in PhoneList) {
size += pb::CodedOutputStream.ComputeMessageSize(4, element);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static Person ParseFrom(pb::ByteString data) { public static Person ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -886,7 +896,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _addressBookFieldNames; string[] field_names = _addressBookFieldNames;
if (person_.Count > 0) { if (person_.Count > 0) {
output.WriteMessageArray(1, field_names[0], person_); output.WriteMessageArray(1, field_names[0], person_);
@ -899,17 +909,22 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
foreach (global::Google.ProtocolBuffers.Examples.AddressBook.Person element in PersonList) {
size += pb::CodedOutputStream.ComputeMessageSize(1, element);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
foreach (global::Google.ProtocolBuffers.Examples.AddressBook.Person element in PersonList) {
size += pb::CodedOutputStream.ComputeMessageSize(1, element);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static AddressBook ParseFrom(pb::ByteString data) { public static AddressBook ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }

@ -582,7 +582,7 @@ namespace Google.ProtocolBuffers.ProtoBench {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _speedMessage1FieldNames; string[] field_names = _speedMessage1FieldNames;
if (hasField1) { if (hasField1) {
output.WriteString(1, field_names[0], Field1); output.WriteString(1, field_names[0], Field1);
@ -715,140 +715,145 @@ namespace Google.ProtocolBuffers.ProtoBench {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasField1) {
size += pb::CodedOutputStream.ComputeStringSize(1, Field1);
}
if (hasField9) {
size += pb::CodedOutputStream.ComputeStringSize(9, Field9);
}
if (hasField18) {
size += pb::CodedOutputStream.ComputeStringSize(18, Field18);
}
if (hasField80) {
size += pb::CodedOutputStream.ComputeBoolSize(80, Field80);
}
if (hasField81) {
size += pb::CodedOutputStream.ComputeBoolSize(81, Field81);
}
if (hasField2) {
size += pb::CodedOutputStream.ComputeInt32Size(2, Field2);
}
if (hasField3) {
size += pb::CodedOutputStream.ComputeInt32Size(3, Field3);
}
if (hasField280) {
size += pb::CodedOutputStream.ComputeInt32Size(280, Field280);
}
if (hasField6) {
size += pb::CodedOutputStream.ComputeInt32Size(6, Field6);
}
if (hasField22) {
size += pb::CodedOutputStream.ComputeInt64Size(22, Field22);
}
if (hasField4) {
size += pb::CodedOutputStream.ComputeStringSize(4, Field4);
}
{
int dataSize = 0;
dataSize = 8 * field5_.Count;
size += dataSize;
size += 1 * field5_.Count;
}
if (hasField59) {
size += pb::CodedOutputStream.ComputeBoolSize(59, Field59);
}
if (hasField7) {
size += pb::CodedOutputStream.ComputeStringSize(7, Field7);
}
if (hasField16) {
size += pb::CodedOutputStream.ComputeInt32Size(16, Field16);
}
if (hasField130) {
size += pb::CodedOutputStream.ComputeInt32Size(130, Field130);
}
if (hasField12) {
size += pb::CodedOutputStream.ComputeBoolSize(12, Field12);
}
if (hasField17) {
size += pb::CodedOutputStream.ComputeBoolSize(17, Field17);
}
if (hasField13) {
size += pb::CodedOutputStream.ComputeBoolSize(13, Field13);
}
if (hasField14) {
size += pb::CodedOutputStream.ComputeBoolSize(14, Field14);
}
if (hasField104) {
size += pb::CodedOutputStream.ComputeInt32Size(104, Field104);
}
if (hasField100) {
size += pb::CodedOutputStream.ComputeInt32Size(100, Field100);
}
if (hasField101) {
size += pb::CodedOutputStream.ComputeInt32Size(101, Field101);
}
if (hasField102) {
size += pb::CodedOutputStream.ComputeStringSize(102, Field102);
}
if (hasField103) {
size += pb::CodedOutputStream.ComputeStringSize(103, Field103);
}
if (hasField29) {
size += pb::CodedOutputStream.ComputeInt32Size(29, Field29);
}
if (hasField30) {
size += pb::CodedOutputStream.ComputeBoolSize(30, Field30);
}
if (hasField60) {
size += pb::CodedOutputStream.ComputeInt32Size(60, Field60);
}
if (hasField271) {
size += pb::CodedOutputStream.ComputeInt32Size(271, Field271);
}
if (hasField272) {
size += pb::CodedOutputStream.ComputeInt32Size(272, Field272);
}
if (hasField150) {
size += pb::CodedOutputStream.ComputeInt32Size(150, Field150);
}
if (hasField23) {
size += pb::CodedOutputStream.ComputeInt32Size(23, Field23);
}
if (hasField24) {
size += pb::CodedOutputStream.ComputeBoolSize(24, Field24);
}
if (hasField25) {
size += pb::CodedOutputStream.ComputeInt32Size(25, Field25);
}
if (hasField15) {
size += pb::CodedOutputStream.ComputeMessageSize(15, Field15);
}
if (hasField78) {
size += pb::CodedOutputStream.ComputeBoolSize(78, Field78);
}
if (hasField67) {
size += pb::CodedOutputStream.ComputeInt32Size(67, Field67);
}
if (hasField68) {
size += pb::CodedOutputStream.ComputeInt32Size(68, Field68);
}
if (hasField128) {
size += pb::CodedOutputStream.ComputeInt32Size(128, Field128);
}
if (hasField129) {
size += pb::CodedOutputStream.ComputeStringSize(129, Field129);
}
if (hasField131) {
size += pb::CodedOutputStream.ComputeInt32Size(131, Field131);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasField1) {
size += pb::CodedOutputStream.ComputeStringSize(1, Field1);
}
if (hasField9) {
size += pb::CodedOutputStream.ComputeStringSize(9, Field9);
}
if (hasField18) {
size += pb::CodedOutputStream.ComputeStringSize(18, Field18);
}
if (hasField80) {
size += pb::CodedOutputStream.ComputeBoolSize(80, Field80);
}
if (hasField81) {
size += pb::CodedOutputStream.ComputeBoolSize(81, Field81);
}
if (hasField2) {
size += pb::CodedOutputStream.ComputeInt32Size(2, Field2);
}
if (hasField3) {
size += pb::CodedOutputStream.ComputeInt32Size(3, Field3);
}
if (hasField280) {
size += pb::CodedOutputStream.ComputeInt32Size(280, Field280);
}
if (hasField6) {
size += pb::CodedOutputStream.ComputeInt32Size(6, Field6);
}
if (hasField22) {
size += pb::CodedOutputStream.ComputeInt64Size(22, Field22);
}
if (hasField4) {
size += pb::CodedOutputStream.ComputeStringSize(4, Field4);
}
{
int dataSize = 0;
dataSize = 8 * field5_.Count;
size += dataSize;
size += 1 * field5_.Count;
}
if (hasField59) {
size += pb::CodedOutputStream.ComputeBoolSize(59, Field59);
}
if (hasField7) {
size += pb::CodedOutputStream.ComputeStringSize(7, Field7);
}
if (hasField16) {
size += pb::CodedOutputStream.ComputeInt32Size(16, Field16);
}
if (hasField130) {
size += pb::CodedOutputStream.ComputeInt32Size(130, Field130);
}
if (hasField12) {
size += pb::CodedOutputStream.ComputeBoolSize(12, Field12);
}
if (hasField17) {
size += pb::CodedOutputStream.ComputeBoolSize(17, Field17);
}
if (hasField13) {
size += pb::CodedOutputStream.ComputeBoolSize(13, Field13);
}
if (hasField14) {
size += pb::CodedOutputStream.ComputeBoolSize(14, Field14);
}
if (hasField104) {
size += pb::CodedOutputStream.ComputeInt32Size(104, Field104);
}
if (hasField100) {
size += pb::CodedOutputStream.ComputeInt32Size(100, Field100);
}
if (hasField101) {
size += pb::CodedOutputStream.ComputeInt32Size(101, Field101);
}
if (hasField102) {
size += pb::CodedOutputStream.ComputeStringSize(102, Field102);
}
if (hasField103) {
size += pb::CodedOutputStream.ComputeStringSize(103, Field103);
}
if (hasField29) {
size += pb::CodedOutputStream.ComputeInt32Size(29, Field29);
}
if (hasField30) {
size += pb::CodedOutputStream.ComputeBoolSize(30, Field30);
}
if (hasField60) {
size += pb::CodedOutputStream.ComputeInt32Size(60, Field60);
}
if (hasField271) {
size += pb::CodedOutputStream.ComputeInt32Size(271, Field271);
}
if (hasField272) {
size += pb::CodedOutputStream.ComputeInt32Size(272, Field272);
}
if (hasField150) {
size += pb::CodedOutputStream.ComputeInt32Size(150, Field150);
}
if (hasField23) {
size += pb::CodedOutputStream.ComputeInt32Size(23, Field23);
}
if (hasField24) {
size += pb::CodedOutputStream.ComputeBoolSize(24, Field24);
}
if (hasField25) {
size += pb::CodedOutputStream.ComputeInt32Size(25, Field25);
}
if (hasField15) {
size += pb::CodedOutputStream.ComputeMessageSize(15, Field15);
}
if (hasField78) {
size += pb::CodedOutputStream.ComputeBoolSize(78, Field78);
}
if (hasField67) {
size += pb::CodedOutputStream.ComputeInt32Size(67, Field67);
}
if (hasField68) {
size += pb::CodedOutputStream.ComputeInt32Size(68, Field68);
}
if (hasField128) {
size += pb::CodedOutputStream.ComputeInt32Size(128, Field128);
}
if (hasField129) {
size += pb::CodedOutputStream.ComputeStringSize(129, Field129);
}
if (hasField131) {
size += pb::CodedOutputStream.ComputeInt32Size(131, Field131);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static SpeedMessage1 ParseFrom(pb::ByteString data) { public static SpeedMessage1 ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -2419,7 +2424,7 @@ namespace Google.ProtocolBuffers.ProtoBench {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _speedMessage1SubMessageFieldNames; string[] field_names = _speedMessage1SubMessageFieldNames;
if (hasField1) { if (hasField1) {
output.WriteInt32(1, field_names[0], Field1); output.WriteInt32(1, field_names[0], Field1);
@ -2489,74 +2494,79 @@ namespace Google.ProtocolBuffers.ProtoBench {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasField1) {
size += pb::CodedOutputStream.ComputeInt32Size(1, Field1);
}
if (hasField2) {
size += pb::CodedOutputStream.ComputeInt32Size(2, Field2);
}
if (hasField3) {
size += pb::CodedOutputStream.ComputeInt32Size(3, Field3);
}
if (hasField15) {
size += pb::CodedOutputStream.ComputeStringSize(15, Field15);
}
if (hasField12) {
size += pb::CodedOutputStream.ComputeBoolSize(12, Field12);
}
if (hasField13) {
size += pb::CodedOutputStream.ComputeInt64Size(13, Field13);
}
if (hasField14) {
size += pb::CodedOutputStream.ComputeInt64Size(14, Field14);
}
if (hasField16) {
size += pb::CodedOutputStream.ComputeInt32Size(16, Field16);
}
if (hasField19) {
size += pb::CodedOutputStream.ComputeInt32Size(19, Field19);
}
if (hasField20) {
size += pb::CodedOutputStream.ComputeBoolSize(20, Field20);
}
if (hasField28) {
size += pb::CodedOutputStream.ComputeBoolSize(28, Field28);
}
if (hasField21) {
size += pb::CodedOutputStream.ComputeFixed64Size(21, Field21);
}
if (hasField22) {
size += pb::CodedOutputStream.ComputeInt32Size(22, Field22);
}
if (hasField23) {
size += pb::CodedOutputStream.ComputeBoolSize(23, Field23);
}
if (hasField206) {
size += pb::CodedOutputStream.ComputeBoolSize(206, Field206);
}
if (hasField203) {
size += pb::CodedOutputStream.ComputeFixed32Size(203, Field203);
}
if (hasField204) {
size += pb::CodedOutputStream.ComputeInt32Size(204, Field204);
}
if (hasField205) {
size += pb::CodedOutputStream.ComputeStringSize(205, Field205);
}
if (hasField207) {
size += pb::CodedOutputStream.ComputeUInt64Size(207, Field207);
}
if (hasField300) {
size += pb::CodedOutputStream.ComputeUInt64Size(300, Field300);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasField1) {
size += pb::CodedOutputStream.ComputeInt32Size(1, Field1);
}
if (hasField2) {
size += pb::CodedOutputStream.ComputeInt32Size(2, Field2);
}
if (hasField3) {
size += pb::CodedOutputStream.ComputeInt32Size(3, Field3);
}
if (hasField15) {
size += pb::CodedOutputStream.ComputeStringSize(15, Field15);
}
if (hasField12) {
size += pb::CodedOutputStream.ComputeBoolSize(12, Field12);
}
if (hasField13) {
size += pb::CodedOutputStream.ComputeInt64Size(13, Field13);
}
if (hasField14) {
size += pb::CodedOutputStream.ComputeInt64Size(14, Field14);
}
if (hasField16) {
size += pb::CodedOutputStream.ComputeInt32Size(16, Field16);
}
if (hasField19) {
size += pb::CodedOutputStream.ComputeInt32Size(19, Field19);
}
if (hasField20) {
size += pb::CodedOutputStream.ComputeBoolSize(20, Field20);
}
if (hasField28) {
size += pb::CodedOutputStream.ComputeBoolSize(28, Field28);
}
if (hasField21) {
size += pb::CodedOutputStream.ComputeFixed64Size(21, Field21);
}
if (hasField22) {
size += pb::CodedOutputStream.ComputeInt32Size(22, Field22);
}
if (hasField23) {
size += pb::CodedOutputStream.ComputeBoolSize(23, Field23);
}
if (hasField206) {
size += pb::CodedOutputStream.ComputeBoolSize(206, Field206);
}
if (hasField203) {
size += pb::CodedOutputStream.ComputeFixed32Size(203, Field203);
}
if (hasField204) {
size += pb::CodedOutputStream.ComputeInt32Size(204, Field204);
}
if (hasField205) {
size += pb::CodedOutputStream.ComputeStringSize(205, Field205);
}
if (hasField207) {
size += pb::CodedOutputStream.ComputeUInt64Size(207, Field207);
}
if (hasField300) {
size += pb::CodedOutputStream.ComputeUInt64Size(300, Field300);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static SpeedMessage1SubMessage ParseFrom(pb::ByteString data) { public static SpeedMessage1SubMessage ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -3514,7 +3524,7 @@ namespace Google.ProtocolBuffers.ProtoBench {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _group1FieldNames; string[] field_names = _group1FieldNames;
if (hasField5) { if (hasField5) {
output.WriteInt32(5, field_names[14], Field5); output.WriteInt32(5, field_names[14], Field5);
@ -3572,77 +3582,82 @@ namespace Google.ProtocolBuffers.ProtoBench {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
}
}
size = 0; private int CalcSerializedSize() {
if (hasField11) { int size = memoizedSerializedSize;
size += pb::CodedOutputStream.ComputeFloatSize(11, Field11); if (size != -1) return size;
}
if (hasField26) { size = 0;
size += pb::CodedOutputStream.ComputeFloatSize(26, Field26); if (hasField11) {
} size += pb::CodedOutputStream.ComputeFloatSize(11, Field11);
if (hasField12) { }
size += pb::CodedOutputStream.ComputeStringSize(12, Field12); if (hasField26) {
} size += pb::CodedOutputStream.ComputeFloatSize(26, Field26);
if (hasField13) { }
size += pb::CodedOutputStream.ComputeStringSize(13, Field13); if (hasField12) {
} size += pb::CodedOutputStream.ComputeStringSize(12, Field12);
{ }
int dataSize = 0; if (hasField13) {
foreach (string element in Field14List) { size += pb::CodedOutputStream.ComputeStringSize(13, Field13);
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element); }
} {
size += dataSize; int dataSize = 0;
size += 1 * field14_.Count; foreach (string element in Field14List) {
} dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
if (hasField15) {
size += pb::CodedOutputStream.ComputeUInt64Size(15, Field15);
}
if (hasField5) {
size += pb::CodedOutputStream.ComputeInt32Size(5, Field5);
}
if (hasField27) {
size += pb::CodedOutputStream.ComputeStringSize(27, Field27);
}
if (hasField28) {
size += pb::CodedOutputStream.ComputeInt32Size(28, Field28);
}
if (hasField29) {
size += pb::CodedOutputStream.ComputeStringSize(29, Field29);
}
if (hasField16) {
size += pb::CodedOutputStream.ComputeStringSize(16, Field16);
}
{
int dataSize = 0;
foreach (string element in Field22List) {
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
}
size += dataSize;
size += 2 * field22_.Count;
}
{
int dataSize = 0;
foreach (int element in Field73List) {
dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
}
size += dataSize;
size += 2 * field73_.Count;
}
if (hasField20) {
size += pb::CodedOutputStream.ComputeInt32Size(20, Field20);
} }
if (hasField24) { size += dataSize;
size += pb::CodedOutputStream.ComputeStringSize(24, Field24); size += 1 * field14_.Count;
}
if (hasField15) {
size += pb::CodedOutputStream.ComputeUInt64Size(15, Field15);
}
if (hasField5) {
size += pb::CodedOutputStream.ComputeInt32Size(5, Field5);
}
if (hasField27) {
size += pb::CodedOutputStream.ComputeStringSize(27, Field27);
}
if (hasField28) {
size += pb::CodedOutputStream.ComputeInt32Size(28, Field28);
}
if (hasField29) {
size += pb::CodedOutputStream.ComputeStringSize(29, Field29);
}
if (hasField16) {
size += pb::CodedOutputStream.ComputeStringSize(16, Field16);
}
{
int dataSize = 0;
foreach (string element in Field22List) {
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
} }
if (hasField31) { size += dataSize;
size += pb::CodedOutputStream.ComputeMessageSize(31, Field31); size += 2 * field22_.Count;
}
{
int dataSize = 0;
foreach (int element in Field73List) {
dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
} }
size += UnknownFields.SerializedSize; size += dataSize;
memoizedSerializedSize = size; size += 2 * field73_.Count;
return size; }
if (hasField20) {
size += pb::CodedOutputStream.ComputeInt32Size(20, Field20);
}
if (hasField24) {
size += pb::CodedOutputStream.ComputeStringSize(24, Field24);
}
if (hasField31) {
size += pb::CodedOutputStream.ComputeMessageSize(31, Field31);
} }
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
public static Group1 ParseFrom(pb::ByteString data) { public static Group1 ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -4640,7 +4655,7 @@ namespace Google.ProtocolBuffers.ProtoBench {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _speedMessage2FieldNames; string[] field_names = _speedMessage2FieldNames;
if (hasField1) { if (hasField1) {
output.WriteString(1, field_names[0], Field1); output.WriteString(1, field_names[0], Field1);
@ -4740,119 +4755,124 @@ namespace Google.ProtocolBuffers.ProtoBench {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
}
}
size = 0; private int CalcSerializedSize() {
if (hasField1) { int size = memoizedSerializedSize;
size += pb::CodedOutputStream.ComputeStringSize(1, Field1); if (size != -1) return size;
}
if (hasField3) { size = 0;
size += pb::CodedOutputStream.ComputeInt64Size(3, Field3); if (hasField1) {
} size += pb::CodedOutputStream.ComputeStringSize(1, Field1);
if (hasField4) { }
size += pb::CodedOutputStream.ComputeInt64Size(4, Field4); if (hasField3) {
} size += pb::CodedOutputStream.ComputeInt64Size(3, Field3);
if (hasField30) { }
size += pb::CodedOutputStream.ComputeInt64Size(30, Field30); if (hasField4) {
} size += pb::CodedOutputStream.ComputeInt64Size(4, Field4);
if (hasField75) { }
size += pb::CodedOutputStream.ComputeBoolSize(75, Field75); if (hasField30) {
} size += pb::CodedOutputStream.ComputeInt64Size(30, Field30);
if (hasField6) { }
size += pb::CodedOutputStream.ComputeStringSize(6, Field6); if (hasField75) {
} size += pb::CodedOutputStream.ComputeBoolSize(75, Field75);
if (hasField2) { }
size += pb::CodedOutputStream.ComputeBytesSize(2, Field2); if (hasField6) {
} size += pb::CodedOutputStream.ComputeStringSize(6, Field6);
if (hasField21) { }
size += pb::CodedOutputStream.ComputeInt32Size(21, Field21); if (hasField2) {
} size += pb::CodedOutputStream.ComputeBytesSize(2, Field2);
if (hasField71) { }
size += pb::CodedOutputStream.ComputeInt32Size(71, Field71); if (hasField21) {
} size += pb::CodedOutputStream.ComputeInt32Size(21, Field21);
if (hasField25) { }
size += pb::CodedOutputStream.ComputeFloatSize(25, Field25); if (hasField71) {
} size += pb::CodedOutputStream.ComputeInt32Size(71, Field71);
if (hasField109) { }
size += pb::CodedOutputStream.ComputeInt32Size(109, Field109); if (hasField25) {
} size += pb::CodedOutputStream.ComputeFloatSize(25, Field25);
if (hasField210) { }
size += pb::CodedOutputStream.ComputeInt32Size(210, Field210); if (hasField109) {
} size += pb::CodedOutputStream.ComputeInt32Size(109, Field109);
if (hasField211) { }
size += pb::CodedOutputStream.ComputeInt32Size(211, Field211); if (hasField210) {
} size += pb::CodedOutputStream.ComputeInt32Size(210, Field210);
if (hasField212) { }
size += pb::CodedOutputStream.ComputeInt32Size(212, Field212); if (hasField211) {
} size += pb::CodedOutputStream.ComputeInt32Size(211, Field211);
if (hasField213) { }
size += pb::CodedOutputStream.ComputeInt32Size(213, Field213); if (hasField212) {
} size += pb::CodedOutputStream.ComputeInt32Size(212, Field212);
if (hasField216) { }
size += pb::CodedOutputStream.ComputeInt32Size(216, Field216); if (hasField213) {
} size += pb::CodedOutputStream.ComputeInt32Size(213, Field213);
if (hasField217) { }
size += pb::CodedOutputStream.ComputeInt32Size(217, Field217); if (hasField216) {
} size += pb::CodedOutputStream.ComputeInt32Size(216, Field216);
if (hasField218) { }
size += pb::CodedOutputStream.ComputeInt32Size(218, Field218); if (hasField217) {
} size += pb::CodedOutputStream.ComputeInt32Size(217, Field217);
if (hasField220) { }
size += pb::CodedOutputStream.ComputeInt32Size(220, Field220); if (hasField218) {
} size += pb::CodedOutputStream.ComputeInt32Size(218, Field218);
if (hasField221) { }
size += pb::CodedOutputStream.ComputeInt32Size(221, Field221); if (hasField220) {
} size += pb::CodedOutputStream.ComputeInt32Size(220, Field220);
if (hasField222) { }
size += pb::CodedOutputStream.ComputeFloatSize(222, Field222); if (hasField221) {
} size += pb::CodedOutputStream.ComputeInt32Size(221, Field221);
if (hasField63) { }
size += pb::CodedOutputStream.ComputeInt32Size(63, Field63); if (hasField222) {
} size += pb::CodedOutputStream.ComputeFloatSize(222, Field222);
foreach (global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1 element in Group1List) { }
size += pb::CodedOutputStream.ComputeGroupSize(10, element); if (hasField63) {
} size += pb::CodedOutputStream.ComputeInt32Size(63, Field63);
{ }
int dataSize = 0; foreach (global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1 element in Group1List) {
foreach (string element in Field128List) { size += pb::CodedOutputStream.ComputeGroupSize(10, element);
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element); }
} {
size += dataSize; int dataSize = 0;
size += 2 * field128_.Count; foreach (string element in Field128List) {
} dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
if (hasField131) {
size += pb::CodedOutputStream.ComputeInt64Size(131, Field131);
}
{
int dataSize = 0;
foreach (string element in Field127List) {
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
}
size += dataSize;
size += 2 * field127_.Count;
}
if (hasField129) {
size += pb::CodedOutputStream.ComputeInt32Size(129, Field129);
}
{
int dataSize = 0;
foreach (long element in Field130List) {
dataSize += pb::CodedOutputStream.ComputeInt64SizeNoTag(element);
}
size += dataSize;
size += 2 * field130_.Count;
} }
if (hasField205) { size += dataSize;
size += pb::CodedOutputStream.ComputeBoolSize(205, Field205); size += 2 * field128_.Count;
}
if (hasField131) {
size += pb::CodedOutputStream.ComputeInt64Size(131, Field131);
}
{
int dataSize = 0;
foreach (string element in Field127List) {
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
} }
if (hasField206) { size += dataSize;
size += pb::CodedOutputStream.ComputeBoolSize(206, Field206); size += 2 * field127_.Count;
}
if (hasField129) {
size += pb::CodedOutputStream.ComputeInt32Size(129, Field129);
}
{
int dataSize = 0;
foreach (long element in Field130List) {
dataSize += pb::CodedOutputStream.ComputeInt64SizeNoTag(element);
} }
size += UnknownFields.SerializedSize; size += dataSize;
memoizedSerializedSize = size; size += 2 * field130_.Count;
return size; }
if (hasField205) {
size += pb::CodedOutputStream.ComputeBoolSize(205, Field205);
} }
if (hasField206) {
size += pb::CodedOutputStream.ComputeBoolSize(206, Field206);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
public static SpeedMessage2 ParseFrom(pb::ByteString data) { public static SpeedMessage2 ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -6048,7 +6068,7 @@ namespace Google.ProtocolBuffers.ProtoBench {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _speedMessage2GroupedMessageFieldNames; string[] field_names = _speedMessage2GroupedMessageFieldNames;
if (hasField1) { if (hasField1) {
output.WriteFloat(1, field_names[0], Field1); output.WriteFloat(1, field_names[0], Field1);
@ -6091,47 +6111,52 @@ namespace Google.ProtocolBuffers.ProtoBench {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasField1) {
size += pb::CodedOutputStream.ComputeFloatSize(1, Field1);
}
if (hasField2) {
size += pb::CodedOutputStream.ComputeFloatSize(2, Field2);
}
if (hasField3) {
size += pb::CodedOutputStream.ComputeFloatSize(3, Field3);
}
if (hasField4) {
size += pb::CodedOutputStream.ComputeBoolSize(4, Field4);
}
if (hasField5) {
size += pb::CodedOutputStream.ComputeBoolSize(5, Field5);
}
if (hasField6) {
size += pb::CodedOutputStream.ComputeBoolSize(6, Field6);
}
if (hasField7) {
size += pb::CodedOutputStream.ComputeBoolSize(7, Field7);
}
if (hasField8) {
size += pb::CodedOutputStream.ComputeFloatSize(8, Field8);
}
if (hasField9) {
size += pb::CodedOutputStream.ComputeBoolSize(9, Field9);
}
if (hasField10) {
size += pb::CodedOutputStream.ComputeFloatSize(10, Field10);
}
if (hasField11) {
size += pb::CodedOutputStream.ComputeInt64Size(11, Field11);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasField1) {
size += pb::CodedOutputStream.ComputeFloatSize(1, Field1);
}
if (hasField2) {
size += pb::CodedOutputStream.ComputeFloatSize(2, Field2);
}
if (hasField3) {
size += pb::CodedOutputStream.ComputeFloatSize(3, Field3);
}
if (hasField4) {
size += pb::CodedOutputStream.ComputeBoolSize(4, Field4);
}
if (hasField5) {
size += pb::CodedOutputStream.ComputeBoolSize(5, Field5);
}
if (hasField6) {
size += pb::CodedOutputStream.ComputeBoolSize(6, Field6);
}
if (hasField7) {
size += pb::CodedOutputStream.ComputeBoolSize(7, Field7);
}
if (hasField8) {
size += pb::CodedOutputStream.ComputeFloatSize(8, Field8);
}
if (hasField9) {
size += pb::CodedOutputStream.ComputeBoolSize(9, Field9);
}
if (hasField10) {
size += pb::CodedOutputStream.ComputeFloatSize(10, Field10);
}
if (hasField11) {
size += pb::CodedOutputStream.ComputeInt64Size(11, Field11);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static SpeedMessage2GroupedMessage ParseFrom(pb::ByteString data) { public static SpeedMessage2GroupedMessage ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }

@ -107,7 +107,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _importMessageFieldNames; string[] field_names = _importMessageFieldNames;
if (hasD) { if (hasD) {
output.WriteInt32(1, field_names[0], D); output.WriteInt32(1, field_names[0], D);
@ -120,17 +120,22 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasD) {
size += pb::CodedOutputStream.ComputeInt32Size(1, D);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasD) {
size += pb::CodedOutputStream.ComputeInt32Size(1, D);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static ImportMessage ParseFrom(pb::ByteString data) { public static ImportMessage ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }

File diff suppressed because it is too large Load Diff

@ -118,7 +118,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _optionsMessageFieldNames; string[] field_names = _optionsMessageFieldNames;
if (hasNormal) { if (hasNormal) {
output.WriteString(1, field_names[1], Normal); output.WriteString(1, field_names[1], Normal);
@ -137,23 +137,28 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasNormal) {
size += pb::CodedOutputStream.ComputeStringSize(1, Normal);
}
if (hasOptionsMessage_) {
size += pb::CodedOutputStream.ComputeStringSize(2, OptionsMessage_);
}
if (hasCustomName) {
size += pb::CodedOutputStream.ComputeStringSize(3, CustomName);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasNormal) {
size += pb::CodedOutputStream.ComputeStringSize(1, Normal);
}
if (hasOptionsMessage_) {
size += pb::CodedOutputStream.ComputeStringSize(2, OptionsMessage_);
}
if (hasCustomName) {
size += pb::CodedOutputStream.ComputeStringSize(3, CustomName);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static OptionsMessage ParseFrom(pb::ByteString data) { public static OptionsMessage ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }

@ -541,7 +541,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _testMessageWithCustomOptionsFieldNames; string[] field_names = _testMessageWithCustomOptionsFieldNames;
if (hasField1) { if (hasField1) {
output.WriteString(1, field_names[0], Field1); output.WriteString(1, field_names[0], Field1);
@ -554,17 +554,22 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasField1) {
size += pb::CodedOutputStream.ComputeStringSize(1, Field1);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasField1) {
size += pb::CodedOutputStream.ComputeStringSize(1, Field1);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static TestMessageWithCustomOptions ParseFrom(pb::ByteString data) { public static TestMessageWithCustomOptions ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -802,7 +807,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _customOptionFooRequestFieldNames; string[] field_names = _customOptionFooRequestFieldNames;
UnknownFields.WriteTo(output); UnknownFields.WriteTo(output);
} }
@ -812,14 +817,19 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static CustomOptionFooRequest ParseFrom(pb::ByteString data) { public static CustomOptionFooRequest ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -1029,7 +1039,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _customOptionFooResponseFieldNames; string[] field_names = _customOptionFooResponseFieldNames;
UnknownFields.WriteTo(output); UnknownFields.WriteTo(output);
} }
@ -1039,14 +1049,19 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static CustomOptionFooResponse ParseFrom(pb::ByteString data) { public static CustomOptionFooResponse ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -1267,7 +1282,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _dummyMessageContainingEnumFieldNames; string[] field_names = _dummyMessageContainingEnumFieldNames;
UnknownFields.WriteTo(output); UnknownFields.WriteTo(output);
} }
@ -1277,14 +1292,19 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static DummyMessageContainingEnum ParseFrom(pb::ByteString data) { public static DummyMessageContainingEnum ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -1494,7 +1514,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _dummyMessageInvalidAsOptionTypeFieldNames; string[] field_names = _dummyMessageInvalidAsOptionTypeFieldNames;
UnknownFields.WriteTo(output); UnknownFields.WriteTo(output);
} }
@ -1504,14 +1524,19 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static DummyMessageInvalidAsOptionType ParseFrom(pb::ByteString data) { public static DummyMessageInvalidAsOptionType ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -1721,7 +1746,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _customOptionMinIntegerValuesFieldNames; string[] field_names = _customOptionMinIntegerValuesFieldNames;
UnknownFields.WriteTo(output); UnknownFields.WriteTo(output);
} }
@ -1731,14 +1756,19 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static CustomOptionMinIntegerValues ParseFrom(pb::ByteString data) { public static CustomOptionMinIntegerValues ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -1948,7 +1978,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _customOptionMaxIntegerValuesFieldNames; string[] field_names = _customOptionMaxIntegerValuesFieldNames;
UnknownFields.WriteTo(output); UnknownFields.WriteTo(output);
} }
@ -1958,14 +1988,19 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static CustomOptionMaxIntegerValues ParseFrom(pb::ByteString data) { public static CustomOptionMaxIntegerValues ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -2175,7 +2210,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _customOptionOtherValuesFieldNames; string[] field_names = _customOptionOtherValuesFieldNames;
UnknownFields.WriteTo(output); UnknownFields.WriteTo(output);
} }
@ -2185,14 +2220,19 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static CustomOptionOtherValues ParseFrom(pb::ByteString data) { public static CustomOptionOtherValues ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -2402,7 +2442,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _settingRealsFromPositiveIntsFieldNames; string[] field_names = _settingRealsFromPositiveIntsFieldNames;
UnknownFields.WriteTo(output); UnknownFields.WriteTo(output);
} }
@ -2412,14 +2452,19 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static SettingRealsFromPositiveInts ParseFrom(pb::ByteString data) { public static SettingRealsFromPositiveInts ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -2629,7 +2674,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _settingRealsFromNegativeIntsFieldNames; string[] field_names = _settingRealsFromNegativeIntsFieldNames;
UnknownFields.WriteTo(output); UnknownFields.WriteTo(output);
} }
@ -2639,14 +2684,19 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static SettingRealsFromNegativeInts ParseFrom(pb::ByteString data) { public static SettingRealsFromNegativeInts ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -2887,7 +2937,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _complexOptionType1FieldNames; string[] field_names = _complexOptionType1FieldNames;
pb::ExtendableMessage<ComplexOptionType1, ComplexOptionType1.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this); pb::ExtendableMessage<ComplexOptionType1, ComplexOptionType1.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
if (hasFoo) { if (hasFoo) {
@ -2908,24 +2958,29 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasFoo) {
size += pb::CodedOutputStream.ComputeInt32Size(1, Foo);
}
if (hasFoo2) {
size += pb::CodedOutputStream.ComputeInt32Size(2, Foo2);
}
if (hasFoo3) {
size += pb::CodedOutputStream.ComputeInt32Size(3, Foo3);
}
size += ExtensionsSerializedSize;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasFoo) {
size += pb::CodedOutputStream.ComputeInt32Size(1, Foo);
}
if (hasFoo2) {
size += pb::CodedOutputStream.ComputeInt32Size(2, Foo2);
}
if (hasFoo3) {
size += pb::CodedOutputStream.ComputeInt32Size(3, Foo3);
}
size += ExtensionsSerializedSize;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static ComplexOptionType1 ParseFrom(pb::ByteString data) { public static ComplexOptionType1 ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -3258,7 +3313,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _complexOptionType4FieldNames; string[] field_names = _complexOptionType4FieldNames;
if (hasWaldo) { if (hasWaldo) {
output.WriteInt32(1, field_names[0], Waldo); output.WriteInt32(1, field_names[0], Waldo);
@ -3271,17 +3326,22 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasWaldo) {
size += pb::CodedOutputStream.ComputeInt32Size(1, Waldo);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasWaldo) {
size += pb::CodedOutputStream.ComputeInt32Size(1, Waldo);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static ComplexOptionType4 ParseFrom(pb::ByteString data) { public static ComplexOptionType4 ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -3529,7 +3589,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _complexOptionType2FieldNames; string[] field_names = _complexOptionType2FieldNames;
pb::ExtendableMessage<ComplexOptionType2, ComplexOptionType2.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this); pb::ExtendableMessage<ComplexOptionType2, ComplexOptionType2.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
if (hasBar) { if (hasBar) {
@ -3550,24 +3610,29 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasBar) {
size += pb::CodedOutputStream.ComputeMessageSize(1, Bar);
}
if (hasBaz) {
size += pb::CodedOutputStream.ComputeInt32Size(2, Baz);
}
if (hasFred) {
size += pb::CodedOutputStream.ComputeMessageSize(3, Fred);
}
size += ExtensionsSerializedSize;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasBar) {
size += pb::CodedOutputStream.ComputeMessageSize(1, Bar);
}
if (hasBaz) {
size += pb::CodedOutputStream.ComputeInt32Size(2, Baz);
}
if (hasFred) {
size += pb::CodedOutputStream.ComputeMessageSize(3, Fred);
}
size += ExtensionsSerializedSize;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static ComplexOptionType2 ParseFrom(pb::ByteString data) { public static ComplexOptionType2 ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -3948,7 +4013,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _complexOptionType5FieldNames; string[] field_names = _complexOptionType5FieldNames;
if (hasPlugh) { if (hasPlugh) {
output.WriteInt32(3, field_names[0], Plugh); output.WriteInt32(3, field_names[0], Plugh);
@ -3961,17 +4026,22 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasPlugh) {
size += pb::CodedOutputStream.ComputeInt32Size(3, Plugh);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasPlugh) {
size += pb::CodedOutputStream.ComputeInt32Size(3, Plugh);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static ComplexOptionType5 ParseFrom(pb::ByteString data) { public static ComplexOptionType5 ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -4205,7 +4275,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _complexOptionType3FieldNames; string[] field_names = _complexOptionType3FieldNames;
if (hasQux) { if (hasQux) {
output.WriteInt32(1, field_names[1], Qux); output.WriteInt32(1, field_names[1], Qux);
@ -4221,20 +4291,25 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasQux) {
size += pb::CodedOutputStream.ComputeInt32Size(1, Qux);
}
if (hasComplexOptionType5) {
size += pb::CodedOutputStream.ComputeGroupSize(2, ComplexOptionType5);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasQux) {
size += pb::CodedOutputStream.ComputeInt32Size(1, Qux);
}
if (hasComplexOptionType5) {
size += pb::CodedOutputStream.ComputeGroupSize(2, ComplexOptionType5);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static ComplexOptionType3 ParseFrom(pb::ByteString data) { public static ComplexOptionType3 ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -4533,7 +4608,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _complexOpt6FieldNames; string[] field_names = _complexOpt6FieldNames;
if (hasXyzzy) { if (hasXyzzy) {
output.WriteInt32(7593951, field_names[0], Xyzzy); output.WriteInt32(7593951, field_names[0], Xyzzy);
@ -4546,17 +4621,22 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasXyzzy) {
size += pb::CodedOutputStream.ComputeInt32Size(7593951, Xyzzy);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasXyzzy) {
size += pb::CodedOutputStream.ComputeInt32Size(7593951, Xyzzy);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static ComplexOpt6 ParseFrom(pb::ByteString data) { public static ComplexOpt6 ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -4793,7 +4873,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _variousComplexOptionsFieldNames; string[] field_names = _variousComplexOptionsFieldNames;
UnknownFields.WriteTo(output); UnknownFields.WriteTo(output);
} }
@ -4803,14 +4883,19 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static VariousComplexOptions ParseFrom(pb::ByteString data) { public static VariousComplexOptions ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -5021,7 +5106,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _aggregateMessageSetFieldNames; string[] field_names = _aggregateMessageSetFieldNames;
pb::ExtendableMessage<AggregateMessageSet, AggregateMessageSet.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this); pb::ExtendableMessage<AggregateMessageSet, AggregateMessageSet.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
extensionWriter.WriteUntil(536870912, output); extensionWriter.WriteUntil(536870912, output);
@ -5033,15 +5118,20 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
size += ExtensionsSerializedSize;
size += UnknownFields.SerializedSizeAsMessageSet;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
size += ExtensionsSerializedSize;
size += UnknownFields.SerializedSizeAsMessageSet;
memoizedSerializedSize = size;
return size;
}
public static AggregateMessageSet ParseFrom(pb::ByteString data) { public static AggregateMessageSet ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -5264,7 +5354,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _aggregateMessageSetElementFieldNames; string[] field_names = _aggregateMessageSetElementFieldNames;
if (hasS) { if (hasS) {
output.WriteString(1, field_names[0], S); output.WriteString(1, field_names[0], S);
@ -5277,17 +5367,22 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasS) {
size += pb::CodedOutputStream.ComputeStringSize(1, S);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasS) {
size += pb::CodedOutputStream.ComputeStringSize(1, S);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static AggregateMessageSetElement ParseFrom(pb::ByteString data) { public static AggregateMessageSetElement ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -5583,7 +5678,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _aggregateFieldNames; string[] field_names = _aggregateFieldNames;
if (hasI) { if (hasI) {
output.WriteInt32(1, field_names[1], I); output.WriteInt32(1, field_names[1], I);
@ -5608,29 +5703,34 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasI) {
size += pb::CodedOutputStream.ComputeInt32Size(1, I);
}
if (hasS) {
size += pb::CodedOutputStream.ComputeStringSize(2, S);
}
if (hasSub) {
size += pb::CodedOutputStream.ComputeMessageSize(3, Sub);
}
if (hasFile) {
size += pb::CodedOutputStream.ComputeMessageSize(4, File);
}
if (hasMset) {
size += pb::CodedOutputStream.ComputeMessageSize(5, Mset);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasI) {
size += pb::CodedOutputStream.ComputeInt32Size(1, I);
}
if (hasS) {
size += pb::CodedOutputStream.ComputeStringSize(2, S);
}
if (hasSub) {
size += pb::CodedOutputStream.ComputeMessageSize(3, Sub);
}
if (hasFile) {
size += pb::CodedOutputStream.ComputeMessageSize(4, File);
}
if (hasMset) {
size += pb::CodedOutputStream.ComputeMessageSize(5, Mset);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static Aggregate ParseFrom(pb::ByteString data) { public static Aggregate ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -6061,7 +6161,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _aggregateMessageFieldNames; string[] field_names = _aggregateMessageFieldNames;
if (hasFieldname) { if (hasFieldname) {
output.WriteInt32(1, field_names[0], Fieldname); output.WriteInt32(1, field_names[0], Fieldname);
@ -6074,17 +6174,22 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasFieldname) {
size += pb::CodedOutputStream.ComputeInt32Size(1, Fieldname);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasFieldname) {
size += pb::CodedOutputStream.ComputeInt32Size(1, Fieldname);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static AggregateMessage ParseFrom(pb::ByteString data) { public static AggregateMessage ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }

@ -120,7 +120,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _testEmbedOptimizedForSizeFieldNames; string[] field_names = _testEmbedOptimizedForSizeFieldNames;
if (hasOptionalMessage) { if (hasOptionalMessage) {
output.WriteMessage(1, field_names[0], OptionalMessage); output.WriteMessage(1, field_names[0], OptionalMessage);
@ -136,20 +136,25 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasOptionalMessage) {
size += pb::CodedOutputStream.ComputeMessageSize(1, OptionalMessage);
}
foreach (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize element in RepeatedMessageList) {
size += pb::CodedOutputStream.ComputeMessageSize(2, element);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasOptionalMessage) {
size += pb::CodedOutputStream.ComputeMessageSize(1, OptionalMessage);
}
foreach (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize element in RepeatedMessageList) {
size += pb::CodedOutputStream.ComputeMessageSize(2, element);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static TestEmbedOptimizedForSize ParseFrom(pb::ByteString data) { public static TestEmbedOptimizedForSize ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }

@ -181,7 +181,7 @@ namespace UnitTest.Issues.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _aFieldNames; string[] field_names = _aFieldNames;
if (hasA_) { if (hasA_) {
output.WriteInt32(1, field_names[0], A_); output.WriteInt32(1, field_names[0], A_);
@ -194,17 +194,22 @@ namespace UnitTest.Issues.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasA_) {
size += pb::CodedOutputStream.ComputeInt32Size(1, A_);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasA_) {
size += pb::CodedOutputStream.ComputeInt32Size(1, A_);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static A ParseFrom(pb::ByteString data) { public static A ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -451,7 +456,7 @@ namespace UnitTest.Issues.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _bFieldNames; string[] field_names = _bFieldNames;
if (hasB_) { if (hasB_) {
output.WriteInt32(1, field_names[0], B_); output.WriteInt32(1, field_names[0], B_);
@ -464,17 +469,22 @@ namespace UnitTest.Issues.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasB_) {
size += pb::CodedOutputStream.ComputeInt32Size(1, B_);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasB_) {
size += pb::CodedOutputStream.ComputeInt32Size(1, B_);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static B ParseFrom(pb::ByteString data) { public static B ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -721,7 +731,7 @@ namespace UnitTest.Issues.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _aBFieldNames; string[] field_names = _aBFieldNames;
if (hasAB_) { if (hasAB_) {
output.WriteInt32(1, field_names[0], AB_); output.WriteInt32(1, field_names[0], AB_);
@ -734,17 +744,22 @@ namespace UnitTest.Issues.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasAB_) {
size += pb::CodedOutputStream.ComputeInt32Size(1, AB_);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasAB_) {
size += pb::CodedOutputStream.ComputeInt32Size(1, AB_);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static AB ParseFrom(pb::ByteString data) { public static AB ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -993,7 +1008,7 @@ namespace UnitTest.Issues.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _numberFieldFieldNames; string[] field_names = _numberFieldFieldNames;
if (has_01) { if (has_01) {
output.WriteInt32(1, field_names[0], _01); output.WriteInt32(1, field_names[0], _01);
@ -1006,17 +1021,22 @@ namespace UnitTest.Issues.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (has_01) {
size += pb::CodedOutputStream.ComputeInt32Size(1, _01);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (has_01) {
size += pb::CodedOutputStream.ComputeInt32Size(1, _01);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static NumberField ParseFrom(pb::ByteString data) { public static NumberField ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -1267,7 +1287,7 @@ namespace UnitTest.Issues.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _myMessageAReferenceBFieldNames; string[] field_names = _myMessageAReferenceBFieldNames;
if (hasValue) { if (hasValue) {
output.WriteMessage(1, field_names[0], Value); output.WriteMessage(1, field_names[0], Value);
@ -1280,17 +1300,22 @@ namespace UnitTest.Issues.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasValue) {
size += pb::CodedOutputStream.ComputeMessageSize(1, Value);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasValue) {
size += pb::CodedOutputStream.ComputeMessageSize(1, Value);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static MyMessageAReferenceB ParseFrom(pb::ByteString data) { public static MyMessageAReferenceB ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -1564,7 +1589,7 @@ namespace UnitTest.Issues.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _myMessageBReferenceAFieldNames; string[] field_names = _myMessageBReferenceAFieldNames;
if (hasValue) { if (hasValue) {
output.WriteMessage(1, field_names[0], Value); output.WriteMessage(1, field_names[0], Value);
@ -1577,17 +1602,22 @@ namespace UnitTest.Issues.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasValue) {
size += pb::CodedOutputStream.ComputeMessageSize(1, Value);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasValue) {
size += pb::CodedOutputStream.ComputeMessageSize(1, Value);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static MyMessageBReferenceA ParseFrom(pb::ByteString data) { public static MyMessageBReferenceA ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -1884,7 +1914,7 @@ namespace UnitTest.Issues.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _negativeEnumMessageFieldNames; string[] field_names = _negativeEnumMessageFieldNames;
if (hasValue) { if (hasValue) {
output.WriteEnum(1, field_names[1], (int) Value, Value); output.WriteEnum(1, field_names[1], (int) Value, Value);
@ -1903,39 +1933,44 @@ namespace UnitTest.Issues.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
}
}
size = 0; private int CalcSerializedSize() {
if (hasValue) { int size = memoizedSerializedSize;
size += pb::CodedOutputStream.ComputeEnumSize(1, (int) Value); if (size != -1) return size;
}
{ size = 0;
int dataSize = 0; if (hasValue) {
if (values_.Count > 0) { size += pb::CodedOutputStream.ComputeEnumSize(1, (int) Value);
foreach (global::UnitTest.Issues.TestProtos.NegativeEnum element in values_) { }
dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element); {
} int dataSize = 0;
size += dataSize; if (values_.Count > 0) {
size += 1 * values_.Count; foreach (global::UnitTest.Issues.TestProtos.NegativeEnum element in values_) {
dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
} }
size += dataSize;
size += 1 * values_.Count;
} }
{ }
int dataSize = 0; {
if (packedValues_.Count > 0) { int dataSize = 0;
foreach (global::UnitTest.Issues.TestProtos.NegativeEnum element in packedValues_) { if (packedValues_.Count > 0) {
dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element); foreach (global::UnitTest.Issues.TestProtos.NegativeEnum element in packedValues_) {
} dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
size += dataSize;
size += 1;
size += pb::CodedOutputStream.ComputeRawVarint32Size((uint) dataSize);
} }
packedValuesMemoizedSerializedSize = dataSize; size += dataSize;
size += 1;
size += pb::CodedOutputStream.ComputeRawVarint32Size((uint) dataSize);
} }
size += UnknownFields.SerializedSize; packedValuesMemoizedSerializedSize = dataSize;
memoizedSerializedSize = size;
return size;
} }
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
public static NegativeEnumMessage ParseFrom(pb::ByteString data) { public static NegativeEnumMessage ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -2276,7 +2311,7 @@ namespace UnitTest.Issues.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _deprecatedChildFieldNames; string[] field_names = _deprecatedChildFieldNames;
UnknownFields.WriteTo(output); UnknownFields.WriteTo(output);
} }
@ -2286,14 +2321,19 @@ namespace UnitTest.Issues.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static DeprecatedChild ParseFrom(pb::ByteString data) { public static DeprecatedChild ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -2584,7 +2624,7 @@ namespace UnitTest.Issues.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _deprecatedFieldsMessageFieldNames; string[] field_names = _deprecatedFieldsMessageFieldNames;
if (hasPrimitiveValue) { if (hasPrimitiveValue) {
output.WriteInt32(1, field_names[5], PrimitiveValue); output.WriteInt32(1, field_names[5], PrimitiveValue);
@ -2612,44 +2652,49 @@ namespace UnitTest.Issues.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
}
}
size = 0; private int CalcSerializedSize() {
if (hasPrimitiveValue) { int size = memoizedSerializedSize;
size += pb::CodedOutputStream.ComputeInt32Size(1, PrimitiveValue); if (size != -1) return size;
size = 0;
if (hasPrimitiveValue) {
size += pb::CodedOutputStream.ComputeInt32Size(1, PrimitiveValue);
}
{
int dataSize = 0;
foreach (int element in PrimitiveArrayList) {
dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
} }
{ size += dataSize;
int dataSize = 0; size += 1 * primitiveArray_.Count;
foreach (int element in PrimitiveArrayList) { }
dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element); if (hasMessageValue) {
size += pb::CodedOutputStream.ComputeMessageSize(3, MessageValue);
}
foreach (global::UnitTest.Issues.TestProtos.DeprecatedChild element in MessageArrayList) {
size += pb::CodedOutputStream.ComputeMessageSize(4, element);
}
if (hasEnumValue) {
size += pb::CodedOutputStream.ComputeEnumSize(5, (int) EnumValue);
}
{
int dataSize = 0;
if (enumArray_.Count > 0) {
foreach (global::UnitTest.Issues.TestProtos.DeprecatedEnum element in enumArray_) {
dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
} }
size += dataSize; size += dataSize;
size += 1 * primitiveArray_.Count; size += 1 * enumArray_.Count;
}
if (hasMessageValue) {
size += pb::CodedOutputStream.ComputeMessageSize(3, MessageValue);
}
foreach (global::UnitTest.Issues.TestProtos.DeprecatedChild element in MessageArrayList) {
size += pb::CodedOutputStream.ComputeMessageSize(4, element);
}
if (hasEnumValue) {
size += pb::CodedOutputStream.ComputeEnumSize(5, (int) EnumValue);
}
{
int dataSize = 0;
if (enumArray_.Count > 0) {
foreach (global::UnitTest.Issues.TestProtos.DeprecatedEnum element in enumArray_) {
dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
}
size += dataSize;
size += 1 * enumArray_.Count;
}
} }
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
public static DeprecatedFieldsMessage ParseFrom(pb::ByteString data) { public static DeprecatedFieldsMessage ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -3159,7 +3204,7 @@ namespace UnitTest.Issues.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _itemFieldFieldNames; string[] field_names = _itemFieldFieldNames;
if (hasItem) { if (hasItem) {
output.WriteInt32(1, field_names[0], Item); output.WriteInt32(1, field_names[0], Item);
@ -3172,17 +3217,22 @@ namespace UnitTest.Issues.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasItem) {
size += pb::CodedOutputStream.ComputeInt32Size(1, Item);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasItem) {
size += pb::CodedOutputStream.ComputeInt32Size(1, Item);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static ItemField ParseFrom(pb::ByteString data) { public static ItemField ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }

@ -190,7 +190,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _testUnpackedExtensionsFieldNames; string[] field_names = _testUnpackedExtensionsFieldNames;
pb::ExtendableMessage<TestUnpackedExtensions, TestUnpackedExtensions.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this); pb::ExtendableMessage<TestUnpackedExtensions, TestUnpackedExtensions.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
extensionWriter.WriteUntil(536870912, output); extensionWriter.WriteUntil(536870912, output);
@ -202,15 +202,20 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
size += ExtensionsSerializedSize;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
size += ExtensionsSerializedSize;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static TestUnpackedExtensions ParseFrom(pb::ByteString data) { public static TestUnpackedExtensions ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }

@ -583,7 +583,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _speedMessage1FieldNames; string[] field_names = _speedMessage1FieldNames;
if (hasField1) { if (hasField1) {
output.WriteString(1, field_names[0], Field1); output.WriteString(1, field_names[0], Field1);
@ -716,140 +716,145 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasField1) {
size += pb::CodedOutputStream.ComputeStringSize(1, Field1);
}
if (hasField9) {
size += pb::CodedOutputStream.ComputeStringSize(9, Field9);
}
if (hasField18) {
size += pb::CodedOutputStream.ComputeStringSize(18, Field18);
}
if (hasField80) {
size += pb::CodedOutputStream.ComputeBoolSize(80, Field80);
}
if (hasField81) {
size += pb::CodedOutputStream.ComputeBoolSize(81, Field81);
}
if (hasField2) {
size += pb::CodedOutputStream.ComputeInt32Size(2, Field2);
}
if (hasField3) {
size += pb::CodedOutputStream.ComputeInt32Size(3, Field3);
}
if (hasField280) {
size += pb::CodedOutputStream.ComputeInt32Size(280, Field280);
}
if (hasField6) {
size += pb::CodedOutputStream.ComputeInt32Size(6, Field6);
}
if (hasField22) {
size += pb::CodedOutputStream.ComputeInt64Size(22, Field22);
}
if (hasField4) {
size += pb::CodedOutputStream.ComputeStringSize(4, Field4);
}
{
int dataSize = 0;
dataSize = 8 * field5_.Count;
size += dataSize;
size += 1 * field5_.Count;
}
if (hasField59) {
size += pb::CodedOutputStream.ComputeBoolSize(59, Field59);
}
if (hasField7) {
size += pb::CodedOutputStream.ComputeStringSize(7, Field7);
}
if (hasField16) {
size += pb::CodedOutputStream.ComputeInt32Size(16, Field16);
}
if (hasField130) {
size += pb::CodedOutputStream.ComputeInt32Size(130, Field130);
}
if (hasField12) {
size += pb::CodedOutputStream.ComputeBoolSize(12, Field12);
}
if (hasField17) {
size += pb::CodedOutputStream.ComputeBoolSize(17, Field17);
}
if (hasField13) {
size += pb::CodedOutputStream.ComputeBoolSize(13, Field13);
}
if (hasField14) {
size += pb::CodedOutputStream.ComputeBoolSize(14, Field14);
}
if (hasField104) {
size += pb::CodedOutputStream.ComputeInt32Size(104, Field104);
}
if (hasField100) {
size += pb::CodedOutputStream.ComputeInt32Size(100, Field100);
}
if (hasField101) {
size += pb::CodedOutputStream.ComputeInt32Size(101, Field101);
}
if (hasField102) {
size += pb::CodedOutputStream.ComputeStringSize(102, Field102);
}
if (hasField103) {
size += pb::CodedOutputStream.ComputeStringSize(103, Field103);
}
if (hasField29) {
size += pb::CodedOutputStream.ComputeInt32Size(29, Field29);
}
if (hasField30) {
size += pb::CodedOutputStream.ComputeBoolSize(30, Field30);
}
if (hasField60) {
size += pb::CodedOutputStream.ComputeInt32Size(60, Field60);
}
if (hasField271) {
size += pb::CodedOutputStream.ComputeInt32Size(271, Field271);
}
if (hasField272) {
size += pb::CodedOutputStream.ComputeInt32Size(272, Field272);
}
if (hasField150) {
size += pb::CodedOutputStream.ComputeInt32Size(150, Field150);
}
if (hasField23) {
size += pb::CodedOutputStream.ComputeInt32Size(23, Field23);
}
if (hasField24) {
size += pb::CodedOutputStream.ComputeBoolSize(24, Field24);
}
if (hasField25) {
size += pb::CodedOutputStream.ComputeInt32Size(25, Field25);
}
if (hasField15) {
size += pb::CodedOutputStream.ComputeMessageSize(15, Field15);
}
if (hasField78) {
size += pb::CodedOutputStream.ComputeBoolSize(78, Field78);
}
if (hasField67) {
size += pb::CodedOutputStream.ComputeInt32Size(67, Field67);
}
if (hasField68) {
size += pb::CodedOutputStream.ComputeInt32Size(68, Field68);
}
if (hasField128) {
size += pb::CodedOutputStream.ComputeInt32Size(128, Field128);
}
if (hasField129) {
size += pb::CodedOutputStream.ComputeStringSize(129, Field129);
}
if (hasField131) {
size += pb::CodedOutputStream.ComputeInt32Size(131, Field131);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasField1) {
size += pb::CodedOutputStream.ComputeStringSize(1, Field1);
}
if (hasField9) {
size += pb::CodedOutputStream.ComputeStringSize(9, Field9);
}
if (hasField18) {
size += pb::CodedOutputStream.ComputeStringSize(18, Field18);
}
if (hasField80) {
size += pb::CodedOutputStream.ComputeBoolSize(80, Field80);
}
if (hasField81) {
size += pb::CodedOutputStream.ComputeBoolSize(81, Field81);
}
if (hasField2) {
size += pb::CodedOutputStream.ComputeInt32Size(2, Field2);
}
if (hasField3) {
size += pb::CodedOutputStream.ComputeInt32Size(3, Field3);
}
if (hasField280) {
size += pb::CodedOutputStream.ComputeInt32Size(280, Field280);
}
if (hasField6) {
size += pb::CodedOutputStream.ComputeInt32Size(6, Field6);
}
if (hasField22) {
size += pb::CodedOutputStream.ComputeInt64Size(22, Field22);
}
if (hasField4) {
size += pb::CodedOutputStream.ComputeStringSize(4, Field4);
}
{
int dataSize = 0;
dataSize = 8 * field5_.Count;
size += dataSize;
size += 1 * field5_.Count;
}
if (hasField59) {
size += pb::CodedOutputStream.ComputeBoolSize(59, Field59);
}
if (hasField7) {
size += pb::CodedOutputStream.ComputeStringSize(7, Field7);
}
if (hasField16) {
size += pb::CodedOutputStream.ComputeInt32Size(16, Field16);
}
if (hasField130) {
size += pb::CodedOutputStream.ComputeInt32Size(130, Field130);
}
if (hasField12) {
size += pb::CodedOutputStream.ComputeBoolSize(12, Field12);
}
if (hasField17) {
size += pb::CodedOutputStream.ComputeBoolSize(17, Field17);
}
if (hasField13) {
size += pb::CodedOutputStream.ComputeBoolSize(13, Field13);
}
if (hasField14) {
size += pb::CodedOutputStream.ComputeBoolSize(14, Field14);
}
if (hasField104) {
size += pb::CodedOutputStream.ComputeInt32Size(104, Field104);
}
if (hasField100) {
size += pb::CodedOutputStream.ComputeInt32Size(100, Field100);
}
if (hasField101) {
size += pb::CodedOutputStream.ComputeInt32Size(101, Field101);
}
if (hasField102) {
size += pb::CodedOutputStream.ComputeStringSize(102, Field102);
}
if (hasField103) {
size += pb::CodedOutputStream.ComputeStringSize(103, Field103);
}
if (hasField29) {
size += pb::CodedOutputStream.ComputeInt32Size(29, Field29);
}
if (hasField30) {
size += pb::CodedOutputStream.ComputeBoolSize(30, Field30);
}
if (hasField60) {
size += pb::CodedOutputStream.ComputeInt32Size(60, Field60);
}
if (hasField271) {
size += pb::CodedOutputStream.ComputeInt32Size(271, Field271);
}
if (hasField272) {
size += pb::CodedOutputStream.ComputeInt32Size(272, Field272);
}
if (hasField150) {
size += pb::CodedOutputStream.ComputeInt32Size(150, Field150);
}
if (hasField23) {
size += pb::CodedOutputStream.ComputeInt32Size(23, Field23);
}
if (hasField24) {
size += pb::CodedOutputStream.ComputeBoolSize(24, Field24);
}
if (hasField25) {
size += pb::CodedOutputStream.ComputeInt32Size(25, Field25);
}
if (hasField15) {
size += pb::CodedOutputStream.ComputeMessageSize(15, Field15);
}
if (hasField78) {
size += pb::CodedOutputStream.ComputeBoolSize(78, Field78);
}
if (hasField67) {
size += pb::CodedOutputStream.ComputeInt32Size(67, Field67);
}
if (hasField68) {
size += pb::CodedOutputStream.ComputeInt32Size(68, Field68);
}
if (hasField128) {
size += pb::CodedOutputStream.ComputeInt32Size(128, Field128);
}
if (hasField129) {
size += pb::CodedOutputStream.ComputeStringSize(129, Field129);
}
if (hasField131) {
size += pb::CodedOutputStream.ComputeInt32Size(131, Field131);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static SpeedMessage1 ParseFrom(pb::ByteString data) { public static SpeedMessage1 ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -2420,7 +2425,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _speedMessage1SubMessageFieldNames; string[] field_names = _speedMessage1SubMessageFieldNames;
if (hasField1) { if (hasField1) {
output.WriteInt32(1, field_names[0], Field1); output.WriteInt32(1, field_names[0], Field1);
@ -2490,74 +2495,79 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasField1) {
size += pb::CodedOutputStream.ComputeInt32Size(1, Field1);
}
if (hasField2) {
size += pb::CodedOutputStream.ComputeInt32Size(2, Field2);
}
if (hasField3) {
size += pb::CodedOutputStream.ComputeInt32Size(3, Field3);
}
if (hasField15) {
size += pb::CodedOutputStream.ComputeStringSize(15, Field15);
}
if (hasField12) {
size += pb::CodedOutputStream.ComputeBoolSize(12, Field12);
}
if (hasField13) {
size += pb::CodedOutputStream.ComputeInt64Size(13, Field13);
}
if (hasField14) {
size += pb::CodedOutputStream.ComputeInt64Size(14, Field14);
}
if (hasField16) {
size += pb::CodedOutputStream.ComputeInt32Size(16, Field16);
}
if (hasField19) {
size += pb::CodedOutputStream.ComputeInt32Size(19, Field19);
}
if (hasField20) {
size += pb::CodedOutputStream.ComputeBoolSize(20, Field20);
}
if (hasField28) {
size += pb::CodedOutputStream.ComputeBoolSize(28, Field28);
}
if (hasField21) {
size += pb::CodedOutputStream.ComputeFixed64Size(21, Field21);
}
if (hasField22) {
size += pb::CodedOutputStream.ComputeInt32Size(22, Field22);
}
if (hasField23) {
size += pb::CodedOutputStream.ComputeBoolSize(23, Field23);
}
if (hasField206) {
size += pb::CodedOutputStream.ComputeBoolSize(206, Field206);
}
if (hasField203) {
size += pb::CodedOutputStream.ComputeFixed32Size(203, Field203);
}
if (hasField204) {
size += pb::CodedOutputStream.ComputeInt32Size(204, Field204);
}
if (hasField205) {
size += pb::CodedOutputStream.ComputeStringSize(205, Field205);
}
if (hasField207) {
size += pb::CodedOutputStream.ComputeUInt64Size(207, Field207);
}
if (hasField300) {
size += pb::CodedOutputStream.ComputeUInt64Size(300, Field300);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasField1) {
size += pb::CodedOutputStream.ComputeInt32Size(1, Field1);
}
if (hasField2) {
size += pb::CodedOutputStream.ComputeInt32Size(2, Field2);
}
if (hasField3) {
size += pb::CodedOutputStream.ComputeInt32Size(3, Field3);
}
if (hasField15) {
size += pb::CodedOutputStream.ComputeStringSize(15, Field15);
}
if (hasField12) {
size += pb::CodedOutputStream.ComputeBoolSize(12, Field12);
}
if (hasField13) {
size += pb::CodedOutputStream.ComputeInt64Size(13, Field13);
}
if (hasField14) {
size += pb::CodedOutputStream.ComputeInt64Size(14, Field14);
}
if (hasField16) {
size += pb::CodedOutputStream.ComputeInt32Size(16, Field16);
}
if (hasField19) {
size += pb::CodedOutputStream.ComputeInt32Size(19, Field19);
}
if (hasField20) {
size += pb::CodedOutputStream.ComputeBoolSize(20, Field20);
}
if (hasField28) {
size += pb::CodedOutputStream.ComputeBoolSize(28, Field28);
}
if (hasField21) {
size += pb::CodedOutputStream.ComputeFixed64Size(21, Field21);
}
if (hasField22) {
size += pb::CodedOutputStream.ComputeInt32Size(22, Field22);
}
if (hasField23) {
size += pb::CodedOutputStream.ComputeBoolSize(23, Field23);
}
if (hasField206) {
size += pb::CodedOutputStream.ComputeBoolSize(206, Field206);
}
if (hasField203) {
size += pb::CodedOutputStream.ComputeFixed32Size(203, Field203);
}
if (hasField204) {
size += pb::CodedOutputStream.ComputeInt32Size(204, Field204);
}
if (hasField205) {
size += pb::CodedOutputStream.ComputeStringSize(205, Field205);
}
if (hasField207) {
size += pb::CodedOutputStream.ComputeUInt64Size(207, Field207);
}
if (hasField300) {
size += pb::CodedOutputStream.ComputeUInt64Size(300, Field300);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static SpeedMessage1SubMessage ParseFrom(pb::ByteString data) { public static SpeedMessage1SubMessage ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -3515,7 +3525,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _group1FieldNames; string[] field_names = _group1FieldNames;
if (hasField5) { if (hasField5) {
output.WriteInt32(5, field_names[14], Field5); output.WriteInt32(5, field_names[14], Field5);
@ -3573,77 +3583,82 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
}
}
size = 0; private int CalcSerializedSize() {
if (hasField11) { int size = memoizedSerializedSize;
size += pb::CodedOutputStream.ComputeFloatSize(11, Field11); if (size != -1) return size;
}
if (hasField26) { size = 0;
size += pb::CodedOutputStream.ComputeFloatSize(26, Field26); if (hasField11) {
} size += pb::CodedOutputStream.ComputeFloatSize(11, Field11);
if (hasField12) { }
size += pb::CodedOutputStream.ComputeStringSize(12, Field12); if (hasField26) {
} size += pb::CodedOutputStream.ComputeFloatSize(26, Field26);
if (hasField13) { }
size += pb::CodedOutputStream.ComputeStringSize(13, Field13); if (hasField12) {
} size += pb::CodedOutputStream.ComputeStringSize(12, Field12);
{ }
int dataSize = 0; if (hasField13) {
foreach (string element in Field14List) { size += pb::CodedOutputStream.ComputeStringSize(13, Field13);
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element); }
} {
size += dataSize; int dataSize = 0;
size += 1 * field14_.Count; foreach (string element in Field14List) {
} dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
if (hasField15) {
size += pb::CodedOutputStream.ComputeUInt64Size(15, Field15);
}
if (hasField5) {
size += pb::CodedOutputStream.ComputeInt32Size(5, Field5);
}
if (hasField27) {
size += pb::CodedOutputStream.ComputeStringSize(27, Field27);
}
if (hasField28) {
size += pb::CodedOutputStream.ComputeInt32Size(28, Field28);
}
if (hasField29) {
size += pb::CodedOutputStream.ComputeStringSize(29, Field29);
}
if (hasField16) {
size += pb::CodedOutputStream.ComputeStringSize(16, Field16);
}
{
int dataSize = 0;
foreach (string element in Field22List) {
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
}
size += dataSize;
size += 2 * field22_.Count;
}
{
int dataSize = 0;
foreach (int element in Field73List) {
dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
}
size += dataSize;
size += 2 * field73_.Count;
}
if (hasField20) {
size += pb::CodedOutputStream.ComputeInt32Size(20, Field20);
} }
if (hasField24) { size += dataSize;
size += pb::CodedOutputStream.ComputeStringSize(24, Field24); size += 1 * field14_.Count;
}
if (hasField15) {
size += pb::CodedOutputStream.ComputeUInt64Size(15, Field15);
}
if (hasField5) {
size += pb::CodedOutputStream.ComputeInt32Size(5, Field5);
}
if (hasField27) {
size += pb::CodedOutputStream.ComputeStringSize(27, Field27);
}
if (hasField28) {
size += pb::CodedOutputStream.ComputeInt32Size(28, Field28);
}
if (hasField29) {
size += pb::CodedOutputStream.ComputeStringSize(29, Field29);
}
if (hasField16) {
size += pb::CodedOutputStream.ComputeStringSize(16, Field16);
}
{
int dataSize = 0;
foreach (string element in Field22List) {
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
} }
if (hasField31) { size += dataSize;
size += pb::CodedOutputStream.ComputeMessageSize(31, Field31); size += 2 * field22_.Count;
}
{
int dataSize = 0;
foreach (int element in Field73List) {
dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
} }
size += UnknownFields.SerializedSize; size += dataSize;
memoizedSerializedSize = size; size += 2 * field73_.Count;
return size; }
if (hasField20) {
size += pb::CodedOutputStream.ComputeInt32Size(20, Field20);
}
if (hasField24) {
size += pb::CodedOutputStream.ComputeStringSize(24, Field24);
}
if (hasField31) {
size += pb::CodedOutputStream.ComputeMessageSize(31, Field31);
} }
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
public static Group1 ParseFrom(pb::ByteString data) { public static Group1 ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -4641,7 +4656,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _speedMessage2FieldNames; string[] field_names = _speedMessage2FieldNames;
if (hasField1) { if (hasField1) {
output.WriteString(1, field_names[0], Field1); output.WriteString(1, field_names[0], Field1);
@ -4741,119 +4756,124 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
}
}
size = 0; private int CalcSerializedSize() {
if (hasField1) { int size = memoizedSerializedSize;
size += pb::CodedOutputStream.ComputeStringSize(1, Field1); if (size != -1) return size;
}
if (hasField3) { size = 0;
size += pb::CodedOutputStream.ComputeInt64Size(3, Field3); if (hasField1) {
} size += pb::CodedOutputStream.ComputeStringSize(1, Field1);
if (hasField4) { }
size += pb::CodedOutputStream.ComputeInt64Size(4, Field4); if (hasField3) {
} size += pb::CodedOutputStream.ComputeInt64Size(3, Field3);
if (hasField30) { }
size += pb::CodedOutputStream.ComputeInt64Size(30, Field30); if (hasField4) {
} size += pb::CodedOutputStream.ComputeInt64Size(4, Field4);
if (hasField75) { }
size += pb::CodedOutputStream.ComputeBoolSize(75, Field75); if (hasField30) {
} size += pb::CodedOutputStream.ComputeInt64Size(30, Field30);
if (hasField6) { }
size += pb::CodedOutputStream.ComputeStringSize(6, Field6); if (hasField75) {
} size += pb::CodedOutputStream.ComputeBoolSize(75, Field75);
if (hasField2) { }
size += pb::CodedOutputStream.ComputeBytesSize(2, Field2); if (hasField6) {
} size += pb::CodedOutputStream.ComputeStringSize(6, Field6);
if (hasField21) { }
size += pb::CodedOutputStream.ComputeInt32Size(21, Field21); if (hasField2) {
} size += pb::CodedOutputStream.ComputeBytesSize(2, Field2);
if (hasField71) { }
size += pb::CodedOutputStream.ComputeInt32Size(71, Field71); if (hasField21) {
} size += pb::CodedOutputStream.ComputeInt32Size(21, Field21);
if (hasField25) { }
size += pb::CodedOutputStream.ComputeFloatSize(25, Field25); if (hasField71) {
} size += pb::CodedOutputStream.ComputeInt32Size(71, Field71);
if (hasField109) { }
size += pb::CodedOutputStream.ComputeInt32Size(109, Field109); if (hasField25) {
} size += pb::CodedOutputStream.ComputeFloatSize(25, Field25);
if (hasField210) { }
size += pb::CodedOutputStream.ComputeInt32Size(210, Field210); if (hasField109) {
} size += pb::CodedOutputStream.ComputeInt32Size(109, Field109);
if (hasField211) { }
size += pb::CodedOutputStream.ComputeInt32Size(211, Field211); if (hasField210) {
} size += pb::CodedOutputStream.ComputeInt32Size(210, Field210);
if (hasField212) { }
size += pb::CodedOutputStream.ComputeInt32Size(212, Field212); if (hasField211) {
} size += pb::CodedOutputStream.ComputeInt32Size(211, Field211);
if (hasField213) { }
size += pb::CodedOutputStream.ComputeInt32Size(213, Field213); if (hasField212) {
} size += pb::CodedOutputStream.ComputeInt32Size(212, Field212);
if (hasField216) { }
size += pb::CodedOutputStream.ComputeInt32Size(216, Field216); if (hasField213) {
} size += pb::CodedOutputStream.ComputeInt32Size(213, Field213);
if (hasField217) { }
size += pb::CodedOutputStream.ComputeInt32Size(217, Field217); if (hasField216) {
} size += pb::CodedOutputStream.ComputeInt32Size(216, Field216);
if (hasField218) { }
size += pb::CodedOutputStream.ComputeInt32Size(218, Field218); if (hasField217) {
} size += pb::CodedOutputStream.ComputeInt32Size(217, Field217);
if (hasField220) { }
size += pb::CodedOutputStream.ComputeInt32Size(220, Field220); if (hasField218) {
} size += pb::CodedOutputStream.ComputeInt32Size(218, Field218);
if (hasField221) { }
size += pb::CodedOutputStream.ComputeInt32Size(221, Field221); if (hasField220) {
} size += pb::CodedOutputStream.ComputeInt32Size(220, Field220);
if (hasField222) { }
size += pb::CodedOutputStream.ComputeFloatSize(222, Field222); if (hasField221) {
} size += pb::CodedOutputStream.ComputeInt32Size(221, Field221);
if (hasField63) { }
size += pb::CodedOutputStream.ComputeInt32Size(63, Field63); if (hasField222) {
} size += pb::CodedOutputStream.ComputeFloatSize(222, Field222);
foreach (global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1 element in Group1List) { }
size += pb::CodedOutputStream.ComputeGroupSize(10, element); if (hasField63) {
} size += pb::CodedOutputStream.ComputeInt32Size(63, Field63);
{ }
int dataSize = 0; foreach (global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1 element in Group1List) {
foreach (string element in Field128List) { size += pb::CodedOutputStream.ComputeGroupSize(10, element);
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element); }
} {
size += dataSize; int dataSize = 0;
size += 2 * field128_.Count; foreach (string element in Field128List) {
} dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
if (hasField131) {
size += pb::CodedOutputStream.ComputeInt64Size(131, Field131);
}
{
int dataSize = 0;
foreach (string element in Field127List) {
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
}
size += dataSize;
size += 2 * field127_.Count;
}
if (hasField129) {
size += pb::CodedOutputStream.ComputeInt32Size(129, Field129);
}
{
int dataSize = 0;
foreach (long element in Field130List) {
dataSize += pb::CodedOutputStream.ComputeInt64SizeNoTag(element);
}
size += dataSize;
size += 2 * field130_.Count;
} }
if (hasField205) { size += dataSize;
size += pb::CodedOutputStream.ComputeBoolSize(205, Field205); size += 2 * field128_.Count;
}
if (hasField131) {
size += pb::CodedOutputStream.ComputeInt64Size(131, Field131);
}
{
int dataSize = 0;
foreach (string element in Field127List) {
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
} }
if (hasField206) { size += dataSize;
size += pb::CodedOutputStream.ComputeBoolSize(206, Field206); size += 2 * field127_.Count;
}
if (hasField129) {
size += pb::CodedOutputStream.ComputeInt32Size(129, Field129);
}
{
int dataSize = 0;
foreach (long element in Field130List) {
dataSize += pb::CodedOutputStream.ComputeInt64SizeNoTag(element);
} }
size += UnknownFields.SerializedSize; size += dataSize;
memoizedSerializedSize = size; size += 2 * field130_.Count;
return size; }
if (hasField205) {
size += pb::CodedOutputStream.ComputeBoolSize(205, Field205);
} }
if (hasField206) {
size += pb::CodedOutputStream.ComputeBoolSize(206, Field206);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
public static SpeedMessage2 ParseFrom(pb::ByteString data) { public static SpeedMessage2 ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -6049,7 +6069,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _speedMessage2GroupedMessageFieldNames; string[] field_names = _speedMessage2GroupedMessageFieldNames;
if (hasField1) { if (hasField1) {
output.WriteFloat(1, field_names[0], Field1); output.WriteFloat(1, field_names[0], Field1);
@ -6092,47 +6112,52 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasField1) {
size += pb::CodedOutputStream.ComputeFloatSize(1, Field1);
}
if (hasField2) {
size += pb::CodedOutputStream.ComputeFloatSize(2, Field2);
}
if (hasField3) {
size += pb::CodedOutputStream.ComputeFloatSize(3, Field3);
}
if (hasField4) {
size += pb::CodedOutputStream.ComputeBoolSize(4, Field4);
}
if (hasField5) {
size += pb::CodedOutputStream.ComputeBoolSize(5, Field5);
}
if (hasField6) {
size += pb::CodedOutputStream.ComputeBoolSize(6, Field6);
}
if (hasField7) {
size += pb::CodedOutputStream.ComputeBoolSize(7, Field7);
}
if (hasField8) {
size += pb::CodedOutputStream.ComputeFloatSize(8, Field8);
}
if (hasField9) {
size += pb::CodedOutputStream.ComputeBoolSize(9, Field9);
}
if (hasField10) {
size += pb::CodedOutputStream.ComputeFloatSize(10, Field10);
}
if (hasField11) {
size += pb::CodedOutputStream.ComputeInt64Size(11, Field11);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasField1) {
size += pb::CodedOutputStream.ComputeFloatSize(1, Field1);
}
if (hasField2) {
size += pb::CodedOutputStream.ComputeFloatSize(2, Field2);
}
if (hasField3) {
size += pb::CodedOutputStream.ComputeFloatSize(3, Field3);
}
if (hasField4) {
size += pb::CodedOutputStream.ComputeBoolSize(4, Field4);
}
if (hasField5) {
size += pb::CodedOutputStream.ComputeBoolSize(5, Field5);
}
if (hasField6) {
size += pb::CodedOutputStream.ComputeBoolSize(6, Field6);
}
if (hasField7) {
size += pb::CodedOutputStream.ComputeBoolSize(7, Field7);
}
if (hasField8) {
size += pb::CodedOutputStream.ComputeFloatSize(8, Field8);
}
if (hasField9) {
size += pb::CodedOutputStream.ComputeBoolSize(9, Field9);
}
if (hasField10) {
size += pb::CodedOutputStream.ComputeFloatSize(10, Field10);
}
if (hasField11) {
size += pb::CodedOutputStream.ComputeInt64Size(11, Field11);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static SpeedMessage2GroupedMessage ParseFrom(pb::ByteString data) { public static SpeedMessage2GroupedMessage ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }

@ -70,7 +70,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _importMessageLiteFieldNames; string[] field_names = _importMessageLiteFieldNames;
if (hasD) { if (hasD) {
output.WriteInt32(1, field_names[0], D); output.WriteInt32(1, field_names[0], D);
@ -82,16 +82,21 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasD) {
size += pb::CodedOutputStream.ComputeInt32Size(1, D);
}
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasD) {
size += pb::CodedOutputStream.ComputeInt32Size(1, D);
}
memoizedSerializedSize = size;
return size;
}
#region Lite runtime methods #region Lite runtime methods
public override int GetHashCode() { public override int GetHashCode() {
int hash = GetType().GetHashCode(); int hash = GetType().GetHashCode();

@ -107,7 +107,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _importMessageFieldNames; string[] field_names = _importMessageFieldNames;
if (hasD) { if (hasD) {
output.WriteInt32(1, field_names[0], D); output.WriteInt32(1, field_names[0], D);
@ -120,17 +120,22 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasD) {
size += pb::CodedOutputStream.ComputeInt32Size(1, D);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasD) {
size += pb::CodedOutputStream.ComputeInt32Size(1, D);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static ImportMessage ParseFrom(pb::ByteString data) { public static ImportMessage ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }

@ -132,7 +132,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _testMessageSetFieldNames; string[] field_names = _testMessageSetFieldNames;
pb::ExtendableMessage<TestMessageSet, TestMessageSet.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this); pb::ExtendableMessage<TestMessageSet, TestMessageSet.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
extensionWriter.WriteUntil(536870912, output); extensionWriter.WriteUntil(536870912, output);
@ -144,15 +144,20 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
size += ExtensionsSerializedSize;
size += UnknownFields.SerializedSizeAsMessageSet;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
size += ExtensionsSerializedSize;
size += UnknownFields.SerializedSizeAsMessageSet;
memoizedSerializedSize = size;
return size;
}
public static TestMessageSet ParseFrom(pb::ByteString data) { public static TestMessageSet ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -373,7 +378,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _testMessageSetContainerFieldNames; string[] field_names = _testMessageSetContainerFieldNames;
if (hasMessageSet) { if (hasMessageSet) {
output.WriteMessage(1, field_names[0], MessageSet); output.WriteMessage(1, field_names[0], MessageSet);
@ -386,17 +391,22 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasMessageSet) {
size += pb::CodedOutputStream.ComputeMessageSize(1, MessageSet);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasMessageSet) {
size += pb::CodedOutputStream.ComputeMessageSize(1, MessageSet);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static TestMessageSetContainer ParseFrom(pb::ByteString data) { public static TestMessageSetContainer ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -670,7 +680,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _testMessageSetExtension1FieldNames; string[] field_names = _testMessageSetExtension1FieldNames;
if (hasI) { if (hasI) {
output.WriteInt32(15, field_names[0], I); output.WriteInt32(15, field_names[0], I);
@ -683,17 +693,22 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasI) {
size += pb::CodedOutputStream.ComputeInt32Size(15, I);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasI) {
size += pb::CodedOutputStream.ComputeInt32Size(15, I);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static TestMessageSetExtension1 ParseFrom(pb::ByteString data) { public static TestMessageSetExtension1 ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -942,7 +957,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _testMessageSetExtension2FieldNames; string[] field_names = _testMessageSetExtension2FieldNames;
if (hasStr) { if (hasStr) {
output.WriteString(25, field_names[0], Str); output.WriteString(25, field_names[0], Str);
@ -955,17 +970,22 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasStr) {
size += pb::CodedOutputStream.ComputeStringSize(25, Str);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasStr) {
size += pb::CodedOutputStream.ComputeStringSize(25, Str);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static TestMessageSetExtension2 ParseFrom(pb::ByteString data) { public static TestMessageSetExtension2 ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -1254,7 +1274,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _itemFieldNames; string[] field_names = _itemFieldNames;
if (hasTypeId) { if (hasTypeId) {
output.WriteInt32(2, field_names[1], TypeId); output.WriteInt32(2, field_names[1], TypeId);
@ -1270,20 +1290,25 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasTypeId) {
size += pb::CodedOutputStream.ComputeInt32Size(2, TypeId);
}
if (hasMessage) {
size += pb::CodedOutputStream.ComputeBytesSize(3, Message);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasTypeId) {
size += pb::CodedOutputStream.ComputeInt32Size(2, TypeId);
}
if (hasMessage) {
size += pb::CodedOutputStream.ComputeBytesSize(3, Message);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static Item ParseFrom(pb::ByteString data) { public static Item ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -1537,7 +1562,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _rawMessageSetFieldNames; string[] field_names = _rawMessageSetFieldNames;
if (item_.Count > 0) { if (item_.Count > 0) {
output.WriteGroupArray(1, field_names[0], item_); output.WriteGroupArray(1, field_names[0], item_);
@ -1550,17 +1575,22 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
foreach (global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item element in ItemList) {
size += pb::CodedOutputStream.ComputeGroupSize(1, element);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
foreach (global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item element in ItemList) {
size += pb::CodedOutputStream.ComputeGroupSize(1, element);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static RawMessageSet ParseFrom(pb::ByteString data) { public static RawMessageSet ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }

@ -118,7 +118,7 @@ namespace Google.ProtocolBuffers.TestProtos.NoGenericService {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _testMessageFieldNames; string[] field_names = _testMessageFieldNames;
pb::ExtendableMessage<TestMessage, TestMessage.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this); pb::ExtendableMessage<TestMessage, TestMessage.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
if (hasA) { if (hasA) {
@ -133,18 +133,23 @@ namespace Google.ProtocolBuffers.TestProtos.NoGenericService {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasA) {
size += pb::CodedOutputStream.ComputeInt32Size(1, A);
}
size += ExtensionsSerializedSize;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasA) {
size += pb::CodedOutputStream.ComputeInt32Size(1, A);
}
size += ExtensionsSerializedSize;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static TestMessage ParseFrom(pb::ByteString data) { public static TestMessage ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }

File diff suppressed because it is too large Load Diff

@ -122,7 +122,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _searchRequestFieldNames; string[] field_names = _searchRequestFieldNames;
if (criteria_.Count > 0) { if (criteria_.Count > 0) {
output.WriteStringArray(1, field_names[0], criteria_); output.WriteStringArray(1, field_names[0], criteria_);
@ -135,22 +135,27 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
}
}
size = 0; private int CalcSerializedSize() {
{ int size = memoizedSerializedSize;
int dataSize = 0; if (size != -1) return size;
foreach (string element in CriteriaList) {
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element); size = 0;
} {
size += dataSize; int dataSize = 0;
size += 1 * criteria_.Count; foreach (string element in CriteriaList) {
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
} }
size += UnknownFields.SerializedSize; size += dataSize;
memoizedSerializedSize = size; size += 1 * criteria_.Count;
return size;
} }
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
public static SearchRequest ParseFrom(pb::ByteString data) { public static SearchRequest ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -450,7 +455,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _resultItemFieldNames; string[] field_names = _resultItemFieldNames;
if (hasUrl) { if (hasUrl) {
output.WriteString(1, field_names[1], Url); output.WriteString(1, field_names[1], Url);
@ -466,20 +471,25 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasUrl) {
size += pb::CodedOutputStream.ComputeStringSize(1, Url);
}
if (hasName) {
size += pb::CodedOutputStream.ComputeStringSize(2, Name);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasUrl) {
size += pb::CodedOutputStream.ComputeStringSize(1, Url);
}
if (hasName) {
size += pb::CodedOutputStream.ComputeStringSize(2, Name);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static ResultItem ParseFrom(pb::ByteString data) { public static ResultItem ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -737,7 +747,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _searchResponseFieldNames; string[] field_names = _searchResponseFieldNames;
if (results_.Count > 0) { if (results_.Count > 0) {
output.WriteMessageArray(1, field_names[0], results_); output.WriteMessageArray(1, field_names[0], results_);
@ -750,17 +760,22 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
foreach (global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem element in ResultsList) {
size += pb::CodedOutputStream.ComputeMessageSize(1, element);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
foreach (global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem element in ResultsList) {
size += pb::CodedOutputStream.ComputeMessageSize(1, element);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static SearchResponse ParseFrom(pb::ByteString data) { public static SearchResponse ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -1046,7 +1061,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _refineSearchRequestFieldNames; string[] field_names = _refineSearchRequestFieldNames;
if (criteria_.Count > 0) { if (criteria_.Count > 0) {
output.WriteStringArray(1, field_names[0], criteria_); output.WriteStringArray(1, field_names[0], criteria_);
@ -1062,25 +1077,30 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
}
}
size = 0; private int CalcSerializedSize() {
{ int size = memoizedSerializedSize;
int dataSize = 0; if (size != -1) return size;
foreach (string element in CriteriaList) {
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element); size = 0;
} {
size += dataSize; int dataSize = 0;
size += 1 * criteria_.Count; foreach (string element in CriteriaList) {
} dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
if (hasPreviousResults) {
size += pb::CodedOutputStream.ComputeMessageSize(2, PreviousResults);
} }
size += UnknownFields.SerializedSize; size += dataSize;
memoizedSerializedSize = size; size += 1 * criteria_.Count;
return size;
} }
if (hasPreviousResults) {
size += pb::CodedOutputStream.ComputeMessageSize(2, PreviousResults);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
public static RefineSearchRequest ParseFrom(pb::ByteString data) { public static RefineSearchRequest ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }

@ -187,7 +187,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _testXmlChildFieldNames; string[] field_names = _testXmlChildFieldNames;
if (options_.Count > 0) { if (options_.Count > 0) {
output.WriteEnumArray(3, field_names[1], options_); output.WriteEnumArray(3, field_names[1], options_);
@ -203,27 +203,32 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
}
}
size = 0; private int CalcSerializedSize() {
{ int size = memoizedSerializedSize;
int dataSize = 0; if (size != -1) return size;
if (options_.Count > 0) {
foreach (global::Google.ProtocolBuffers.TestProtos.EnumOptions element in options_) { size = 0;
dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element); {
} int dataSize = 0;
size += dataSize; if (options_.Count > 0) {
size += 1 * options_.Count; foreach (global::Google.ProtocolBuffers.TestProtos.EnumOptions element in options_) {
dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
} }
size += dataSize;
size += 1 * options_.Count;
} }
if (hasBinary) {
size += pb::CodedOutputStream.ComputeBytesSize(4, Binary);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
if (hasBinary) {
size += pb::CodedOutputStream.ComputeBytesSize(4, Binary);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
public static TestXmlChild ParseFrom(pb::ByteString data) { public static TestXmlChild ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -511,7 +516,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _testXmlNoFieldsFieldNames; string[] field_names = _testXmlNoFieldsFieldNames;
UnknownFields.WriteTo(output); UnknownFields.WriteTo(output);
} }
@ -521,14 +526,19 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static TestXmlNoFields ParseFrom(pb::ByteString data) { public static TestXmlNoFields ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -750,7 +760,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _testXmlRescursiveFieldNames; string[] field_names = _testXmlRescursiveFieldNames;
if (hasChild) { if (hasChild) {
output.WriteMessage(1, field_names[0], Child); output.WriteMessage(1, field_names[0], Child);
@ -763,17 +773,22 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasChild) {
size += pb::CodedOutputStream.ComputeMessageSize(1, Child);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasChild) {
size += pb::CodedOutputStream.ComputeMessageSize(1, Child);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static TestXmlRescursive ParseFrom(pb::ByteString data) { public static TestXmlRescursive ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -1089,7 +1104,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _childrenFieldNames; string[] field_names = _childrenFieldNames;
if (options_.Count > 0) { if (options_.Count > 0) {
output.WriteEnumArray(3, field_names[1], options_); output.WriteEnumArray(3, field_names[1], options_);
@ -1105,27 +1120,32 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
}
}
size = 0; private int CalcSerializedSize() {
{ int size = memoizedSerializedSize;
int dataSize = 0; if (size != -1) return size;
if (options_.Count > 0) {
foreach (global::Google.ProtocolBuffers.TestProtos.EnumOptions element in options_) { size = 0;
dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element); {
} int dataSize = 0;
size += dataSize; if (options_.Count > 0) {
size += 1 * options_.Count; foreach (global::Google.ProtocolBuffers.TestProtos.EnumOptions element in options_) {
dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
} }
size += dataSize;
size += 1 * options_.Count;
} }
if (hasBinary) {
size += pb::CodedOutputStream.ComputeBytesSize(4, Binary);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
if (hasBinary) {
size += pb::CodedOutputStream.ComputeBytesSize(4, Binary);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
public static Children ParseFrom(pb::ByteString data) { public static Children ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -1466,7 +1486,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _testXmlMessageFieldNames; string[] field_names = _testXmlMessageFieldNames;
pb::ExtendableMessage<TestXmlMessage, TestXmlMessage.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this); pb::ExtendableMessage<TestXmlMessage, TestXmlMessage.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
if (hasChild) { if (hasChild) {
@ -1499,46 +1519,51 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
}
}
size = 0; private int CalcSerializedSize() {
if (hasNumber) { int size = memoizedSerializedSize;
size += pb::CodedOutputStream.ComputeInt64Size(6, Number); if (size != -1) return size;
}
{ size = 0;
int dataSize = 0; if (hasNumber) {
foreach (int element in NumbersList) { size += pb::CodedOutputStream.ComputeInt64Size(6, Number);
dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element); }
} {
size += dataSize; int dataSize = 0;
size += 1 * numbers_.Count; foreach (int element in NumbersList) {
} dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
if (hasText) {
size += pb::CodedOutputStream.ComputeStringSize(3, Text);
}
{
int dataSize = 0;
foreach (string element in TextlinesList) {
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
}
size += dataSize;
size += 2 * textlines_.Count;
}
if (hasValid) {
size += pb::CodedOutputStream.ComputeBoolSize(5, Valid);
}
if (hasChild) {
size += pb::CodedOutputStream.ComputeMessageSize(1, Child);
} }
foreach (global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children element in ChildrenList) { size += dataSize;
size += pb::CodedOutputStream.ComputeGroupSize(401, element); size += 1 * numbers_.Count;
}
if (hasText) {
size += pb::CodedOutputStream.ComputeStringSize(3, Text);
}
{
int dataSize = 0;
foreach (string element in TextlinesList) {
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
} }
size += ExtensionsSerializedSize; size += dataSize;
size += UnknownFields.SerializedSize; size += 2 * textlines_.Count;
memoizedSerializedSize = size; }
return size; if (hasValid) {
size += pb::CodedOutputStream.ComputeBoolSize(5, Valid);
}
if (hasChild) {
size += pb::CodedOutputStream.ComputeMessageSize(1, Child);
}
foreach (global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children element in ChildrenList) {
size += pb::CodedOutputStream.ComputeGroupSize(401, element);
} }
size += ExtensionsSerializedSize;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
public static TestXmlMessage ParseFrom(pb::ByteString data) { public static TestXmlMessage ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -2027,7 +2052,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _testXmlExtensionFieldNames; string[] field_names = _testXmlExtensionFieldNames;
if (hasNumber) { if (hasNumber) {
output.WriteInt32(1, field_names[0], Number); output.WriteInt32(1, field_names[0], Number);
@ -2040,17 +2065,22 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasNumber) {
size += pb::CodedOutputStream.ComputeInt32Size(1, Number);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasNumber) {
size += pb::CodedOutputStream.ComputeInt32Size(1, Number);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static TestXmlExtension ParseFrom(pb::ByteString data) { public static TestXmlExtension ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }

@ -313,7 +313,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _cSharpFileOptionsFieldNames; string[] field_names = _cSharpFileOptionsFieldNames;
if (hasNamespace) { if (hasNamespace) {
output.WriteString(1, field_names[9], Namespace); output.WriteString(1, field_names[9], Namespace);
@ -371,62 +371,67 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasNamespace) {
size += pb::CodedOutputStream.ComputeStringSize(1, Namespace);
}
if (hasUmbrellaClassname) {
size += pb::CodedOutputStream.ComputeStringSize(2, UmbrellaClassname);
}
if (hasPublicClasses) {
size += pb::CodedOutputStream.ComputeBoolSize(3, PublicClasses);
}
if (hasMultipleFiles) {
size += pb::CodedOutputStream.ComputeBoolSize(4, MultipleFiles);
}
if (hasNestClasses) {
size += pb::CodedOutputStream.ComputeBoolSize(5, NestClasses);
}
if (hasCodeContracts) {
size += pb::CodedOutputStream.ComputeBoolSize(6, CodeContracts);
}
if (hasExpandNamespaceDirectories) {
size += pb::CodedOutputStream.ComputeBoolSize(7, ExpandNamespaceDirectories);
}
if (hasClsCompliance) {
size += pb::CodedOutputStream.ComputeBoolSize(8, ClsCompliance);
}
if (hasAddSerializable) {
size += pb::CodedOutputStream.ComputeBoolSize(9, AddSerializable);
}
if (hasGeneratePrivateCtor) {
size += pb::CodedOutputStream.ComputeBoolSize(10, GeneratePrivateCtor);
}
if (hasFileExtension) {
size += pb::CodedOutputStream.ComputeStringSize(221, FileExtension);
}
if (hasUmbrellaNamespace) {
size += pb::CodedOutputStream.ComputeStringSize(222, UmbrellaNamespace);
}
if (hasOutputDirectory) {
size += pb::CodedOutputStream.ComputeStringSize(223, OutputDirectory);
}
if (hasIgnoreGoogleProtobuf) {
size += pb::CodedOutputStream.ComputeBoolSize(224, IgnoreGoogleProtobuf);
}
if (hasServiceGeneratorType) {
size += pb::CodedOutputStream.ComputeEnumSize(225, (int) ServiceGeneratorType);
}
if (hasGeneratedCodeAttributes) {
size += pb::CodedOutputStream.ComputeBoolSize(226, GeneratedCodeAttributes);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasNamespace) {
size += pb::CodedOutputStream.ComputeStringSize(1, Namespace);
}
if (hasUmbrellaClassname) {
size += pb::CodedOutputStream.ComputeStringSize(2, UmbrellaClassname);
}
if (hasPublicClasses) {
size += pb::CodedOutputStream.ComputeBoolSize(3, PublicClasses);
}
if (hasMultipleFiles) {
size += pb::CodedOutputStream.ComputeBoolSize(4, MultipleFiles);
}
if (hasNestClasses) {
size += pb::CodedOutputStream.ComputeBoolSize(5, NestClasses);
}
if (hasCodeContracts) {
size += pb::CodedOutputStream.ComputeBoolSize(6, CodeContracts);
}
if (hasExpandNamespaceDirectories) {
size += pb::CodedOutputStream.ComputeBoolSize(7, ExpandNamespaceDirectories);
}
if (hasClsCompliance) {
size += pb::CodedOutputStream.ComputeBoolSize(8, ClsCompliance);
}
if (hasAddSerializable) {
size += pb::CodedOutputStream.ComputeBoolSize(9, AddSerializable);
}
if (hasGeneratePrivateCtor) {
size += pb::CodedOutputStream.ComputeBoolSize(10, GeneratePrivateCtor);
}
if (hasFileExtension) {
size += pb::CodedOutputStream.ComputeStringSize(221, FileExtension);
}
if (hasUmbrellaNamespace) {
size += pb::CodedOutputStream.ComputeStringSize(222, UmbrellaNamespace);
}
if (hasOutputDirectory) {
size += pb::CodedOutputStream.ComputeStringSize(223, OutputDirectory);
}
if (hasIgnoreGoogleProtobuf) {
size += pb::CodedOutputStream.ComputeBoolSize(224, IgnoreGoogleProtobuf);
}
if (hasServiceGeneratorType) {
size += pb::CodedOutputStream.ComputeEnumSize(225, (int) ServiceGeneratorType);
}
if (hasGeneratedCodeAttributes) {
size += pb::CodedOutputStream.ComputeBoolSize(226, GeneratedCodeAttributes);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static CSharpFileOptions ParseFrom(pb::ByteString data) { public static CSharpFileOptions ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -1091,7 +1096,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _cSharpFieldOptionsFieldNames; string[] field_names = _cSharpFieldOptionsFieldNames;
if (hasPropertyName) { if (hasPropertyName) {
output.WriteString(1, field_names[0], PropertyName); output.WriteString(1, field_names[0], PropertyName);
@ -1104,17 +1109,22 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasPropertyName) {
size += pb::CodedOutputStream.ComputeStringSize(1, PropertyName);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasPropertyName) {
size += pb::CodedOutputStream.ComputeStringSize(1, PropertyName);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static CSharpFieldOptions ParseFrom(pb::ByteString data) { public static CSharpFieldOptions ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -1362,7 +1372,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _cSharpServiceOptionsFieldNames; string[] field_names = _cSharpServiceOptionsFieldNames;
if (hasInterfaceId) { if (hasInterfaceId) {
output.WriteString(1, field_names[0], InterfaceId); output.WriteString(1, field_names[0], InterfaceId);
@ -1375,17 +1385,22 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasInterfaceId) {
size += pb::CodedOutputStream.ComputeStringSize(1, InterfaceId);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasInterfaceId) {
size += pb::CodedOutputStream.ComputeStringSize(1, InterfaceId);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static CSharpServiceOptions ParseFrom(pb::ByteString data) { public static CSharpServiceOptions ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
@ -1633,7 +1648,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _cSharpMethodOptionsFieldNames; string[] field_names = _cSharpMethodOptionsFieldNames;
if (hasDispatchId) { if (hasDispatchId) {
output.WriteInt32(1, field_names[0], DispatchId); output.WriteInt32(1, field_names[0], DispatchId);
@ -1646,17 +1661,22 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasDispatchId) {
size += pb::CodedOutputStream.ComputeInt32Size(1, DispatchId);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasDispatchId) {
size += pb::CodedOutputStream.ComputeInt32Size(1, DispatchId);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static CSharpMethodOptions ParseFrom(pb::ByteString data) { public static CSharpMethodOptions ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }

File diff suppressed because it is too large Load Diff

@ -277,7 +277,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _testRequiredLiteFieldNames; string[] field_names = _testRequiredLiteFieldNames;
if (hasD) { if (hasD) {
output.WriteInt32(1, field_names[0], D); output.WriteInt32(1, field_names[0], D);
@ -292,19 +292,24 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasD) {
size += pb::CodedOutputStream.ComputeInt32Size(1, D);
}
if (hasEn) {
size += pb::CodedOutputStream.ComputeEnumSize(2, (int) En);
}
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasD) {
size += pb::CodedOutputStream.ComputeInt32Size(1, D);
}
if (hasEn) {
size += pb::CodedOutputStream.ComputeEnumSize(2, (int) En);
}
memoizedSerializedSize = size;
return size;
}
#region Lite runtime methods #region Lite runtime methods
public override int GetHashCode() { public override int GetHashCode() {
int hash = GetType().GetHashCode(); int hash = GetType().GetHashCode();
@ -619,7 +624,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _phoneNumberFieldNames; string[] field_names = _phoneNumberFieldNames;
if (hasNumber) { if (hasNumber) {
output.WriteString(1, field_names[0], Number); output.WriteString(1, field_names[0], Number);
@ -634,19 +639,24 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasNumber) {
size += pb::CodedOutputStream.ComputeStringSize(1, Number);
}
if (hasType) {
size += pb::CodedOutputStream.ComputeEnumSize(2, (int) Type);
}
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasNumber) {
size += pb::CodedOutputStream.ComputeStringSize(1, Number);
}
if (hasType) {
size += pb::CodedOutputStream.ComputeEnumSize(2, (int) Type);
}
memoizedSerializedSize = size;
return size;
}
#region Lite runtime methods #region Lite runtime methods
public override int GetHashCode() { public override int GetHashCode() {
int hash = GetType().GetHashCode(); int hash = GetType().GetHashCode();
@ -968,7 +978,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _addressesFieldNames; string[] field_names = _addressesFieldNames;
if (hasAddress) { if (hasAddress) {
output.WriteString(1, field_names[0], Address); output.WriteString(1, field_names[0], Address);
@ -992,28 +1002,33 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasAddress) {
size += pb::CodedOutputStream.ComputeStringSize(1, Address);
}
if (hasAddress2) {
size += pb::CodedOutputStream.ComputeStringSize(2, Address2);
}
if (hasCity) {
size += pb::CodedOutputStream.ComputeStringSize(3, City);
}
if (hasState) {
size += pb::CodedOutputStream.ComputeStringSize(4, State);
}
if (hasZip) {
size += pb::CodedOutputStream.ComputeFixed32Size(5, Zip);
}
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasAddress) {
size += pb::CodedOutputStream.ComputeStringSize(1, Address);
}
if (hasAddress2) {
size += pb::CodedOutputStream.ComputeStringSize(2, Address2);
}
if (hasCity) {
size += pb::CodedOutputStream.ComputeStringSize(3, City);
}
if (hasState) {
size += pb::CodedOutputStream.ComputeStringSize(4, State);
}
if (hasZip) {
size += pb::CodedOutputStream.ComputeFixed32Size(5, Zip);
}
memoizedSerializedSize = size;
return size;
}
#region Lite runtime methods #region Lite runtime methods
public override int GetHashCode() { public override int GetHashCode() {
int hash = GetType().GetHashCode(); int hash = GetType().GetHashCode();
@ -1428,7 +1443,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _testInteropPersonLiteFieldNames; string[] field_names = _testInteropPersonLiteFieldNames;
pb::ExtendableMessageLite<TestInteropPersonLite, TestInteropPersonLite.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this); pb::ExtendableMessageLite<TestInteropPersonLite, TestInteropPersonLite.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
if (hasName) { if (hasName) {
@ -1457,40 +1472,45 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
}
}
size = 0; private int CalcSerializedSize() {
if (hasName) { int size = memoizedSerializedSize;
size += pb::CodedOutputStream.ComputeStringSize(1, Name); if (size != -1) return size;
}
if (hasId) { size = 0;
size += pb::CodedOutputStream.ComputeInt32Size(2, Id); if (hasName) {
} size += pb::CodedOutputStream.ComputeStringSize(1, Name);
if (hasEmail) { }
size += pb::CodedOutputStream.ComputeStringSize(3, Email); if (hasId) {
} size += pb::CodedOutputStream.ComputeInt32Size(2, Id);
{ }
int dataSize = 0; if (hasEmail) {
foreach (int element in CodesList) { size += pb::CodedOutputStream.ComputeStringSize(3, Email);
dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element); }
} {
size += dataSize; int dataSize = 0;
if (codes_.Count != 0) { foreach (int element in CodesList) {
size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
}
codesMemoizedSerializedSize = dataSize;
}
foreach (global::Google.ProtocolBuffers.TestProtos.TestInteropPersonLite.Types.PhoneNumber element in PhoneList) {
size += pb::CodedOutputStream.ComputeMessageSize(4, element);
} }
foreach (global::Google.ProtocolBuffers.TestProtos.TestInteropPersonLite.Types.Addresses element in AddressesList) { size += dataSize;
size += pb::CodedOutputStream.ComputeGroupSize(5, element); if (codes_.Count != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
} }
size += ExtensionsSerializedSize; codesMemoizedSerializedSize = dataSize;
memoizedSerializedSize = size; }
return size; foreach (global::Google.ProtocolBuffers.TestProtos.TestInteropPersonLite.Types.PhoneNumber element in PhoneList) {
size += pb::CodedOutputStream.ComputeMessageSize(4, element);
} }
foreach (global::Google.ProtocolBuffers.TestProtos.TestInteropPersonLite.Types.Addresses element in AddressesList) {
size += pb::CodedOutputStream.ComputeGroupSize(5, element);
}
size += ExtensionsSerializedSize;
memoizedSerializedSize = size;
return size;
} }
#region Lite runtime methods #region Lite runtime methods
public override int GetHashCode() { public override int GetHashCode() {
int hash = GetType().GetHashCode(); int hash = GetType().GetHashCode();
@ -1960,7 +1980,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _testInteropEmployeeIdLiteFieldNames; string[] field_names = _testInteropEmployeeIdLiteFieldNames;
if (hasNumber) { if (hasNumber) {
output.WriteString(1, field_names[0], Number); output.WriteString(1, field_names[0], Number);
@ -1972,16 +1992,21 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasNumber) {
size += pb::CodedOutputStream.ComputeStringSize(1, Number);
}
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasNumber) {
size += pb::CodedOutputStream.ComputeStringSize(1, Number);
}
memoizedSerializedSize = size;
return size;
}
#region Lite runtime methods #region Lite runtime methods
public override int GetHashCode() { public override int GetHashCode() {
int hash = GetType().GetHashCode(); int hash = GetType().GetHashCode();
@ -2215,7 +2240,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _testUnpackedExtensionsLiteFieldNames; string[] field_names = _testUnpackedExtensionsLiteFieldNames;
pb::ExtendableMessageLite<TestUnpackedExtensionsLite, TestUnpackedExtensionsLite.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this); pb::ExtendableMessageLite<TestUnpackedExtensionsLite, TestUnpackedExtensionsLite.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
extensionWriter.WriteUntil(536870912, output); extensionWriter.WriteUntil(536870912, output);
@ -2226,14 +2251,19 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
size += ExtensionsSerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
size += ExtensionsSerializedSize;
memoizedSerializedSize = size;
return size;
}
#region Lite runtime methods #region Lite runtime methods
public override int GetHashCode() { public override int GetHashCode() {
int hash = GetType().GetHashCode(); int hash = GetType().GetHashCode();
@ -2615,7 +2645,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _testUnpackedTypesLiteFieldNames; string[] field_names = _testUnpackedTypesLiteFieldNames;
if (unpackedInt32_.Count > 0) { if (unpackedInt32_.Count > 0) {
output.WriteInt32Array(90, field_names[6], unpackedInt32_); output.WriteInt32Array(90, field_names[6], unpackedInt32_);
@ -2666,113 +2696,118 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0; }
{ }
int dataSize = 0;
foreach (int element in UnpackedInt32List) { private int CalcSerializedSize() {
dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element); int size = memoizedSerializedSize;
} if (size != -1) return size;
size += dataSize;
size += 2 * unpackedInt32_.Count; size = 0;
} {
{ int dataSize = 0;
int dataSize = 0; foreach (int element in UnpackedInt32List) {
foreach (long element in UnpackedInt64List) { dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
dataSize += pb::CodedOutputStream.ComputeInt64SizeNoTag(element); }
} size += dataSize;
size += dataSize; size += 2 * unpackedInt32_.Count;
size += 2 * unpackedInt64_.Count; }
} {
{ int dataSize = 0;
int dataSize = 0; foreach (long element in UnpackedInt64List) {
foreach (uint element in UnpackedUint32List) { dataSize += pb::CodedOutputStream.ComputeInt64SizeNoTag(element);
dataSize += pb::CodedOutputStream.ComputeUInt32SizeNoTag(element); }
size += dataSize;
size += 2 * unpackedInt64_.Count;
}
{
int dataSize = 0;
foreach (uint element in UnpackedUint32List) {
dataSize += pb::CodedOutputStream.ComputeUInt32SizeNoTag(element);
}
size += dataSize;
size += 2 * unpackedUint32_.Count;
}
{
int dataSize = 0;
foreach (ulong element in UnpackedUint64List) {
dataSize += pb::CodedOutputStream.ComputeUInt64SizeNoTag(element);
}
size += dataSize;
size += 2 * unpackedUint64_.Count;
}
{
int dataSize = 0;
foreach (int element in UnpackedSint32List) {
dataSize += pb::CodedOutputStream.ComputeSInt32SizeNoTag(element);
}
size += dataSize;
size += 2 * unpackedSint32_.Count;
}
{
int dataSize = 0;
foreach (long element in UnpackedSint64List) {
dataSize += pb::CodedOutputStream.ComputeSInt64SizeNoTag(element);
}
size += dataSize;
size += 2 * unpackedSint64_.Count;
}
{
int dataSize = 0;
dataSize = 4 * unpackedFixed32_.Count;
size += dataSize;
size += 2 * unpackedFixed32_.Count;
}
{
int dataSize = 0;
dataSize = 8 * unpackedFixed64_.Count;
size += dataSize;
size += 2 * unpackedFixed64_.Count;
}
{
int dataSize = 0;
dataSize = 4 * unpackedSfixed32_.Count;
size += dataSize;
size += 2 * unpackedSfixed32_.Count;
}
{
int dataSize = 0;
dataSize = 8 * unpackedSfixed64_.Count;
size += dataSize;
size += 2 * unpackedSfixed64_.Count;
}
{
int dataSize = 0;
dataSize = 4 * unpackedFloat_.Count;
size += dataSize;
size += 2 * unpackedFloat_.Count;
}
{
int dataSize = 0;
dataSize = 8 * unpackedDouble_.Count;
size += dataSize;
size += 2 * unpackedDouble_.Count;
}
{
int dataSize = 0;
dataSize = 1 * unpackedBool_.Count;
size += dataSize;
size += 2 * unpackedBool_.Count;
}
{
int dataSize = 0;
if (unpackedEnum_.Count > 0) {
foreach (global::Google.ProtocolBuffers.TestProtos.UnpackedTypesForeignEnumLite element in unpackedEnum_) {
dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
} }
size += dataSize; size += dataSize;
size += 2 * unpackedUint32_.Count; size += 2 * unpackedEnum_.Count;
} }
{
int dataSize = 0;
foreach (ulong element in UnpackedUint64List) {
dataSize += pb::CodedOutputStream.ComputeUInt64SizeNoTag(element);
}
size += dataSize;
size += 2 * unpackedUint64_.Count;
}
{
int dataSize = 0;
foreach (int element in UnpackedSint32List) {
dataSize += pb::CodedOutputStream.ComputeSInt32SizeNoTag(element);
}
size += dataSize;
size += 2 * unpackedSint32_.Count;
}
{
int dataSize = 0;
foreach (long element in UnpackedSint64List) {
dataSize += pb::CodedOutputStream.ComputeSInt64SizeNoTag(element);
}
size += dataSize;
size += 2 * unpackedSint64_.Count;
}
{
int dataSize = 0;
dataSize = 4 * unpackedFixed32_.Count;
size += dataSize;
size += 2 * unpackedFixed32_.Count;
}
{
int dataSize = 0;
dataSize = 8 * unpackedFixed64_.Count;
size += dataSize;
size += 2 * unpackedFixed64_.Count;
}
{
int dataSize = 0;
dataSize = 4 * unpackedSfixed32_.Count;
size += dataSize;
size += 2 * unpackedSfixed32_.Count;
}
{
int dataSize = 0;
dataSize = 8 * unpackedSfixed64_.Count;
size += dataSize;
size += 2 * unpackedSfixed64_.Count;
}
{
int dataSize = 0;
dataSize = 4 * unpackedFloat_.Count;
size += dataSize;
size += 2 * unpackedFloat_.Count;
}
{
int dataSize = 0;
dataSize = 8 * unpackedDouble_.Count;
size += dataSize;
size += 2 * unpackedDouble_.Count;
}
{
int dataSize = 0;
dataSize = 1 * unpackedBool_.Count;
size += dataSize;
size += 2 * unpackedBool_.Count;
}
{
int dataSize = 0;
if (unpackedEnum_.Count > 0) {
foreach (global::Google.ProtocolBuffers.TestProtos.UnpackedTypesForeignEnumLite element in unpackedEnum_) {
dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
}
size += dataSize;
size += 2 * unpackedEnum_.Count;
}
}
memoizedSerializedSize = size;
return size;
} }
memoizedSerializedSize = size;
return size;
} }
#region Lite runtime methods #region Lite runtime methods
public override int GetHashCode() { public override int GetHashCode() {
int hash = GetType().GetHashCode(); int hash = GetType().GetHashCode();
@ -3635,7 +3670,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _bucketOfBytesFieldNames; string[] field_names = _bucketOfBytesFieldNames;
if (hasValue) { if (hasValue) {
output.WriteBytes(1, field_names[0], Value); output.WriteBytes(1, field_names[0], Value);
@ -3647,16 +3682,21 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasValue) {
size += pb::CodedOutputStream.ComputeBytesSize(1, Value);
}
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasValue) {
size += pb::CodedOutputStream.ComputeBytesSize(1, Value);
}
memoizedSerializedSize = size;
return size;
}
#region Lite runtime methods #region Lite runtime methods
public override int GetHashCode() { public override int GetHashCode() {
int hash = GetType().GetHashCode(); int hash = GetType().GetHashCode();
@ -3909,7 +3949,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _bucketOfBytesExFieldNames; string[] field_names = _bucketOfBytesExFieldNames;
if (hasValue) { if (hasValue) {
output.WriteBytes(1, field_names[0], Value); output.WriteBytes(1, field_names[0], Value);
@ -3924,19 +3964,24 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasValue) {
size += pb::CodedOutputStream.ComputeBytesSize(1, Value);
}
if (hasValue2) {
size += pb::CodedOutputStream.ComputeBytesSize(255, Value2);
}
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasValue) {
size += pb::CodedOutputStream.ComputeBytesSize(1, Value);
}
if (hasValue2) {
size += pb::CodedOutputStream.ComputeBytesSize(255, Value2);
}
memoizedSerializedSize = size;
return size;
}
#region Lite runtime methods #region Lite runtime methods
public override int GetHashCode() { public override int GetHashCode() {
int hash = GetType().GetHashCode(); int hash = GetType().GetHashCode();

@ -70,7 +70,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _importMessageLiteFieldNames; string[] field_names = _importMessageLiteFieldNames;
if (hasD) { if (hasD) {
output.WriteInt32(1, field_names[0], D); output.WriteInt32(1, field_names[0], D);
@ -82,16 +82,21 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasD) {
size += pb::CodedOutputStream.ComputeInt32Size(1, D);
}
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasD) {
size += pb::CodedOutputStream.ComputeInt32Size(1, D);
}
memoizedSerializedSize = size;
return size;
}
#region Lite runtime methods #region Lite runtime methods
public override int GetHashCode() { public override int GetHashCode() {
int hash = GetType().GetHashCode(); int hash = GetType().GetHashCode();

@ -107,7 +107,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _importMessageFieldNames; string[] field_names = _importMessageFieldNames;
if (hasD) { if (hasD) {
output.WriteInt32(1, field_names[0], D); output.WriteInt32(1, field_names[0], D);
@ -120,17 +120,22 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasD) {
size += pb::CodedOutputStream.ComputeInt32Size(1, D);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasD) {
size += pb::CodedOutputStream.ComputeInt32Size(1, D);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static ImportMessage ParseFrom(pb::ByteString data) { public static ImportMessage ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }

@ -61,7 +61,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _testLiteImportsNonliteFieldNames; string[] field_names = _testLiteImportsNonliteFieldNames;
if (hasMessage) { if (hasMessage) {
output.WriteMessage(1, field_names[0], Message); output.WriteMessage(1, field_names[0], Message);
@ -73,16 +73,21 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasMessage) {
size += pb::CodedOutputStream.ComputeMessageSize(1, Message);
}
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasMessage) {
size += pb::CodedOutputStream.ComputeMessageSize(1, Message);
}
memoizedSerializedSize = size;
return size;
}
#region Lite runtime methods #region Lite runtime methods
public override int GetHashCode() { public override int GetHashCode() {
int hash = GetType().GetHashCode(); int hash = GetType().GetHashCode();

File diff suppressed because it is too large Load Diff

@ -63,7 +63,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _searchRequestFieldNames; string[] field_names = _searchRequestFieldNames;
if (criteria_.Count > 0) { if (criteria_.Count > 0) {
output.WriteStringArray(1, field_names[0], criteria_); output.WriteStringArray(1, field_names[0], criteria_);
@ -75,21 +75,26 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
}
}
size = 0; private int CalcSerializedSize() {
{ int size = memoizedSerializedSize;
int dataSize = 0; if (size != -1) return size;
foreach (string element in CriteriaList) {
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element); size = 0;
} {
size += dataSize; int dataSize = 0;
size += 1 * criteria_.Count; foreach (string element in CriteriaList) {
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
} }
memoizedSerializedSize = size; size += dataSize;
return size; size += 1 * criteria_.Count;
} }
memoizedSerializedSize = size;
return size;
} }
#region Lite runtime methods #region Lite runtime methods
public override int GetHashCode() { public override int GetHashCode() {
int hash = GetType().GetHashCode(); int hash = GetType().GetHashCode();
@ -377,7 +382,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _resultItemFieldNames; string[] field_names = _resultItemFieldNames;
if (hasUrl) { if (hasUrl) {
output.WriteString(1, field_names[1], Url); output.WriteString(1, field_names[1], Url);
@ -392,19 +397,24 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
if (hasUrl) {
size += pb::CodedOutputStream.ComputeStringSize(1, Url);
}
if (hasName) {
size += pb::CodedOutputStream.ComputeStringSize(2, Name);
}
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasUrl) {
size += pb::CodedOutputStream.ComputeStringSize(1, Url);
}
if (hasName) {
size += pb::CodedOutputStream.ComputeStringSize(2, Name);
}
memoizedSerializedSize = size;
return size;
}
#region Lite runtime methods #region Lite runtime methods
public override int GetHashCode() { public override int GetHashCode() {
int hash = GetType().GetHashCode(); int hash = GetType().GetHashCode();
@ -666,7 +676,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _searchResponseFieldNames; string[] field_names = _searchResponseFieldNames;
if (results_.Count > 0) { if (results_.Count > 0) {
output.WriteMessageArray(1, field_names[0], results_); output.WriteMessageArray(1, field_names[0], results_);
@ -678,16 +688,21 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
size = 0;
foreach (global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem element in ResultsList) {
size += pb::CodedOutputStream.ComputeMessageSize(1, element);
}
memoizedSerializedSize = size;
return size;
} }
} }
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
foreach (global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem element in ResultsList) {
size += pb::CodedOutputStream.ComputeMessageSize(1, element);
}
memoizedSerializedSize = size;
return size;
}
#region Lite runtime methods #region Lite runtime methods
public override int GetHashCode() { public override int GetHashCode() {
int hash = GetType().GetHashCode(); int hash = GetType().GetHashCode();
@ -969,7 +984,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::ICodedOutputStream output) { public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize; CalcSerializedSize();
string[] field_names = _refineSearchRequestFieldNames; string[] field_names = _refineSearchRequestFieldNames;
if (criteria_.Count > 0) { if (criteria_.Count > 0) {
output.WriteStringArray(1, field_names[0], criteria_); output.WriteStringArray(1, field_names[0], criteria_);
@ -984,24 +999,29 @@ namespace Google.ProtocolBuffers.TestProtos {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
return CalcSerializedSize();
}
}
size = 0; private int CalcSerializedSize() {
{ int size = memoizedSerializedSize;
int dataSize = 0; if (size != -1) return size;
foreach (string element in CriteriaList) {
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element); size = 0;
} {
size += dataSize; int dataSize = 0;
size += 1 * criteria_.Count; foreach (string element in CriteriaList) {
} dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
if (hasPreviousResults) {
size += pb::CodedOutputStream.ComputeMessageSize(2, PreviousResults);
} }
memoizedSerializedSize = size; size += dataSize;
return size; size += 1 * criteria_.Count;
} }
if (hasPreviousResults) {
size += pb::CodedOutputStream.ComputeMessageSize(2, PreviousResults);
}
memoizedSerializedSize = size;
return size;
} }
#region Lite runtime methods #region Lite runtime methods
public override int GetHashCode() { public override int GetHashCode() {
int hash = GetType().GetHashCode(); int hash = GetType().GetHashCode();

Loading…
Cancel
Save