Fully converted over to ICodedOutputStream for all WriteTo derivations

pull/288/head
csharptest 14 years ago committed by rogerk
parent cc8d2aaa3a
commit ffafdaa0f9
  1. 10
      src/AddressBook/AddressBookProtos.cs
  2. 2
      src/ProtoGen/MessageGenerator.cs
  3. 8
      src/ProtoGen/RepeatedMessageFieldGenerator.cs
  4. 2
      src/ProtocolBuffers.Test/TestProtos/UnitTestCSharpOptionsProtoFile.cs
  5. 34
      src/ProtocolBuffers.Test/TestProtos/UnitTestCustomOptionsProtoFile.cs
  6. 4
      src/ProtocolBuffers.Test/TestProtos/UnitTestEmbedOptimizeForProtoFile.cs
  7. 12
      src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSpeedProtoFile.cs
  8. 2
      src/ProtocolBuffers.Test/TestProtos/UnitTestImportLiteProtoFile.cs
  9. 2
      src/ProtocolBuffers.Test/TestProtos/UnitTestImportProtoFile.cs
  10. 14
      src/ProtocolBuffers.Test/TestProtos/UnitTestMessageSetProtoFile.cs
  11. 2
      src/ProtocolBuffers.Test/TestProtos/UnitTestNoGenericServicesProtoFile.cs
  12. 94
      src/ProtocolBuffers.Test/TestProtos/UnitTestProtoFile.cs
  13. 10
      src/ProtocolBuffers.Test/TestProtos/UnitTestRpcInterop.cs
  14. 12
      src/ProtocolBuffers.Test/TestProtos/UnitTestXmlSerializerTestProtoFile.cs
  15. 42
      src/ProtocolBuffers/AbstractMessage.cs
  16. 6
      src/ProtocolBuffers/AbstractMessageLite.cs
  17. 14
      src/ProtocolBuffers/CodedOutputStream.cs
  18. 8
      src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs
  19. 76
      src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs
  20. 2
      src/ProtocolBuffers/DynamicMessage.cs
  21. 2
      src/ProtocolBuffers/ExtendableMessage.cs
  22. 2
      src/ProtocolBuffers/ExtendableMessageLite.cs
  23. 48
      src/ProtocolBuffers/FieldSet.cs
  24. 6
      src/ProtocolBuffers/ICodedOutputStream.cs
  25. 8
      src/ProtocolBuffers/IMessage.cs
  26. 8
      src/ProtocolBuffers/IMessageLite.cs
  27. 228
      src/ProtocolBuffers/ProtocolBuffersLite.csproj
  28. 6
      src/ProtocolBuffers/UnknownField.cs
  29. 10
      src/ProtocolBuffers/UnknownFieldSet.cs
  30. 14
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasLiteProtoFile.cs
  31. 2
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestImportLiteProtoFile.cs
  32. 2
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestImportProtoFile.cs
  33. 2
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteImportNonLiteProtoFile.cs
  34. 32
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteProtoFile.cs
  35. 94
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestProtoFile.cs

@ -152,7 +152,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasNumber) {
output.WriteString(1, "number", Number);
@ -428,7 +428,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasName) {
output.WriteString(1, "name", Name);
@ -440,7 +440,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
output.WriteString(3, "email", Email);
}
if (phone_.Count > 0) {
output.WriteMessageArray(4, "phone", phone_);
output.WriteArray(pbd::FieldType.Message, 4, "phone", phone_);
}
UnknownFields.WriteTo(output);
}
@ -772,10 +772,10 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (person_.Count > 0) {
output.WriteMessageArray(1, "person", person_);
output.WriteArray(pbd::FieldType.Message, 1, "person", person_);
}
UnknownFields.WriteTo(output);
}

@ -291,7 +291,7 @@ namespace Google.ProtocolBuffers.ProtoGen
List<ExtensionRange> sortedExtensions = new List<ExtensionRange>(Descriptor.Proto.ExtensionRangeList);
sortedExtensions.Sort((r1, r2) => (r1.Start.CompareTo(r2.Start)));
writer.WriteLine("public override void WriteTo(pb::CodedOutputStream output) {");
writer.WriteLine("public override void WriteTo(pb::ICodedOutputStream output) {");
writer.Indent();
// Make sure we've computed the serialized length, so that packed fields are generated correctly.
writer.WriteLine("int size = SerializedSize;");

@ -137,7 +137,13 @@ namespace Google.ProtocolBuffers.ProtoGen
{
writer.WriteLine("if ({0}_.Count > 0) {{", Name);
writer.Indent();
writer.WriteLine("output.Write{0}Array({1}, \"{3}\", {2}_);", MessageOrGroup, Number, Name, Descriptor.Name);
// Arrays of message types do not currently support 'packed' storage
//if (Descriptor.IsPacked)
// writer.WriteLine("output.WritePackedArray(pbd::FieldType.{3}, {0}, \"{2}\", {1}MemoizedSerializedSize, {1}_);", Number, Name, Descriptor.Name, Descriptor.FieldType);
//else
writer.WriteLine("output.WriteArray(pbd::FieldType.{3}, {0}, \"{2}\", {1}_);", Number, Name, Descriptor.Name, Descriptor.FieldType);
//writer.WriteLine("foreach ({0} element in {1}List) {{", TypeName, PropertyName);
//writer.WriteLine(" output.Write{0}({1}, element);", MessageOrGroup, Number);
//writer.WriteLine("}");

@ -115,7 +115,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasNormal) {
output.WriteString(1, "normal", Normal);

@ -450,7 +450,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasField1) {
output.WriteString(1, "field1", Field1);
@ -662,7 +662,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}
@ -842,7 +842,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}
@ -1037,7 +1037,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}
@ -1217,7 +1217,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}
@ -1397,7 +1397,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}
@ -1577,7 +1577,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}
@ -1757,7 +1757,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}
@ -1937,7 +1937,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}
@ -2117,7 +2117,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}
@ -2328,7 +2328,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<ComplexOptionType1, ComplexOptionType1.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
if (HasFoo) {
@ -2647,7 +2647,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasWaldo) {
output.WriteInt32(1, "waldo", Waldo);
@ -2870,7 +2870,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<ComplexOptionType2, ComplexOptionType2.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
if (HasBar) {
@ -3233,7 +3233,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasPlugh) {
output.WriteInt32(3, "plugh", Plugh);
@ -3442,7 +3442,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasQux) {
output.WriteInt32(1, "qux", Qux);
@ -3717,7 +3717,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasXyzzy) {
output.WriteInt32(7593951, "xyzzy", Xyzzy);
@ -3928,7 +3928,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}

@ -117,13 +117,13 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasOptionalMessage) {
output.WriteMessage(1, "optional_message", OptionalMessage);
}
if (repeatedMessage_.Count > 0) {
output.WriteMessageArray(2, "repeated_message", repeatedMessage_);
output.WriteArray(pbd::FieldType.Message, 2, "repeated_message", repeatedMessage_);
}
UnknownFields.WriteTo(output);
}

@ -579,7 +579,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasField1) {
output.WriteString(1, "field1", Field1);
@ -2282,7 +2282,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasField1) {
output.WriteInt32(1, "field1", Field1);
@ -3291,7 +3291,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasField5) {
output.WriteInt32(5, "field5", Field5);
@ -4330,7 +4330,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasField1) {
output.WriteString(1, "field1", Field1);
@ -4348,7 +4348,7 @@ namespace Google.ProtocolBuffers.TestProtos {
output.WriteString(6, "field6", Field6);
}
if (group1_.Count > 0) {
output.WriteGroupArray(10, "group1", group1_);
output.WriteArray(pbd::FieldType.Group, 10, "group1", group1_);
}
if (HasField21) {
output.WriteInt32(21, "field21", Field21);
@ -5622,7 +5622,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasField1) {
output.WriteFloat(1, "field1", Field1);

@ -70,7 +70,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasD) {
output.WriteInt32(1, "d", D);

@ -106,7 +106,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasD) {
output.WriteInt32(1, "d", D);

@ -129,7 +129,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<TestMessageSet, TestMessageSet.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
extensionWriter.WriteUntil(536870912, output);
@ -323,7 +323,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasMessageSet) {
output.WriteMessage(1, "message_set", MessageSet);
@ -569,7 +569,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasI) {
output.WriteInt32(15, "i", I);
@ -792,7 +792,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasStr) {
output.WriteString(25, "str", Str);
@ -1056,7 +1056,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasTypeId) {
output.WriteInt32(2, "type_id", TypeId);
@ -1289,10 +1289,10 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (item_.Count > 0) {
output.WriteGroupArray(1, "item", item_);
output.WriteArray(pbd::FieldType.Group, 1, "item", item_);
}
UnknownFields.WriteTo(output);
}

@ -117,7 +117,7 @@ namespace Google.ProtocolBuffers.TestProtos.NoGenericService {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<TestMessage, TestMessage.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
if (HasA) {

@ -1103,7 +1103,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasBb) {
output.WriteInt32(1, "bb", Bb);
@ -1324,7 +1324,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(17, "a", A);
@ -1545,7 +1545,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(47, "a", A);
@ -2478,7 +2478,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasOptionalInt32) {
output.WriteInt32(1, "optional_int32", OptionalInt32);
@ -2598,16 +2598,16 @@ namespace Google.ProtocolBuffers.TestProtos {
output.WriteArray(pbd::FieldType.Bytes, 45, "repeated_bytes", repeatedBytes_);
}
if (repeatedGroup_.Count > 0) {
output.WriteGroupArray(46, "repeatedgroup", repeatedGroup_);
output.WriteArray(pbd::FieldType.Group, 46, "repeatedgroup", repeatedGroup_);
}
if (repeatedNestedMessage_.Count > 0) {
output.WriteMessageArray(48, "repeated_nested_message", repeatedNestedMessage_);
output.WriteArray(pbd::FieldType.Message, 48, "repeated_nested_message", repeatedNestedMessage_);
}
if (repeatedForeignMessage_.Count > 0) {
output.WriteMessageArray(49, "repeated_foreign_message", repeatedForeignMessage_);
output.WriteArray(pbd::FieldType.Message, 49, "repeated_foreign_message", repeatedForeignMessage_);
}
if (repeatedImportMessage_.Count > 0) {
output.WriteMessageArray(50, "repeated_import_message", repeatedImportMessage_);
output.WriteArray(pbd::FieldType.Message, 50, "repeated_import_message", repeatedImportMessage_);
}
if (repeatedNestedEnum_.Count > 0) {
output.WriteArray(pbd::FieldType.Enum, 51, "repeated_nested_enum", repeatedNestedEnum_);
@ -5356,7 +5356,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasDeprecatedInt32) {
output.WriteInt32(1, "deprecated_int32", DeprecatedInt32);
@ -5577,7 +5577,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasC) {
output.WriteInt32(1, "c", C);
@ -5789,7 +5789,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<TestAllExtensions, TestAllExtensions.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
extensionWriter.WriteUntil(536870912, output);
@ -5983,7 +5983,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(17, "a", A);
@ -6204,7 +6204,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(47, "a", A);
@ -6417,7 +6417,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}
@ -6934,7 +6934,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(1, "a", A);
@ -8175,13 +8175,13 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasOptionalMessage) {
output.WriteMessage(1, "optional_message", OptionalMessage);
}
if (repeatedMessage_.Count > 0) {
output.WriteMessageArray(2, "repeated_message", repeatedMessage_);
output.WriteArray(pbd::FieldType.Message, 2, "repeated_message", repeatedMessage_);
}
if (HasDummy) {
output.WriteInt32(3, "dummy", Dummy);
@ -8504,7 +8504,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasForeignNested) {
output.WriteMessage(1, "foreign_nested", ForeignNested);
@ -8738,7 +8738,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}
@ -8919,7 +8919,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<TestEmptyMessageWithExtensions, TestEmptyMessageWithExtensions.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
extensionWriter.WriteUntil(536870912, output);
@ -9104,7 +9104,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<TestMultipleExtensionRanges, TestMultipleExtensionRanges.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
extensionWriter.WriteUntil(43, output);
@ -9310,7 +9310,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(1, "a", A);
@ -9572,7 +9572,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteMessage(1, "a", A);
@ -9847,7 +9847,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasBb) {
output.WriteMessage(1, "bb", Bb);
@ -10101,7 +10101,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteMessage(1, "a", A);
@ -10406,7 +10406,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(1, "a", A);
@ -10627,7 +10627,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(1, "a", A);
@ -10846,7 +10846,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(1, "a", A);
@ -11219,13 +11219,13 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (nestedmessageRepeatedInt32_.Count > 0) {
output.WriteArray(pbd::FieldType.Int32, 1, "nestedmessage_repeated_int32", nestedmessageRepeatedInt32_);
}
if (nestedmessageRepeatedForeignmessage_.Count > 0) {
output.WriteMessageArray(2, "nestedmessage_repeated_foreignmessage", nestedmessageRepeatedForeignmessage_);
output.WriteArray(pbd::FieldType.Message, 2, "nestedmessage_repeated_foreignmessage", nestedmessageRepeatedForeignmessage_);
}
UnknownFields.WriteTo(output);
}
@ -11486,7 +11486,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasOptionalNestedMessage) {
output.WriteMessage(1, "optional_nested_message", OptionalNestedMessage);
@ -11852,7 +11852,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasPrimitiveField) {
output.WriteInt32(1, "PrimitiveField", PrimitiveField);
@ -11882,7 +11882,7 @@ namespace Google.ProtocolBuffers.TestProtos {
output.WriteArray(pbd::FieldType.Enum, 9, "RepeatedEnumField", repeatedEnumField_);
}
if (repeatedMessageField_.Count > 0) {
output.WriteMessageArray(10, "RepeatedMessageField", repeatedMessageField_);
output.WriteArray(pbd::FieldType.Message, 10, "RepeatedMessageField", repeatedMessageField_);
}
if (repeatedStringPieceField_.Count > 0) {
output.WriteArray(pbd::FieldType.String, 11, "RepeatedStringPieceField", repeatedStringPieceField_);
@ -12578,7 +12578,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<TestFieldOrderings, TestFieldOrderings.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
if (HasMyInt) {
@ -13049,7 +13049,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasEscapedBytes) {
output.WriteBytes(1, "escaped_bytes", EscapedBytes);
@ -13834,7 +13834,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasData) {
output.WriteString(1, "data", Data);
@ -14056,7 +14056,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasData) {
output.WriteBytes(1, "data", Data);
@ -14458,7 +14458,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (packedInt32_.Count > 0) {
output.WritePackedArray(pbd::FieldType.Int32, 90, "packed_int32", packedInt32MemoizedSerializedSize, packedInt32_);
@ -15571,7 +15571,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (unpackedInt32_.Count > 0) {
output.WriteArray(pbd::FieldType.Int32, 90, "unpacked_int32", unpackedInt32_);
@ -16398,7 +16398,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<TestPackedExtensions, TestPackedExtensions.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
extensionWriter.WriteUntil(536870912, output);
@ -16630,7 +16630,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasDynamicField) {
output.WriteInt32(2100, "dynamic_field", DynamicField);
@ -16895,7 +16895,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasScalarExtension) {
output.WriteFixed32(2000, "scalar_extension", ScalarExtension);
@ -17472,7 +17472,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (repeatedFixed32_.Count > 0) {
output.WriteArray(pbd::FieldType.Fixed32, 12, "repeated_fixed32", repeatedFixed32_);
@ -17931,7 +17931,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}
@ -18111,7 +18111,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}
@ -18291,7 +18291,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}
@ -18471,7 +18471,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}

@ -120,7 +120,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (criteria_.Count > 0) {
output.WriteArray(pbd::FieldType.String, 1, "Criteria", criteria_);
@ -398,7 +398,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasUrl) {
output.WriteString(1, "url", Url);
@ -635,10 +635,10 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (results_.Count > 0) {
output.WriteMessageArray(1, "results", results_);
output.WriteArray(pbd::FieldType.Message, 1, "results", results_);
}
UnknownFields.WriteTo(output);
}
@ -893,7 +893,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (criteria_.Count > 0) {
output.WriteArray(pbd::FieldType.String, 1, "Criteria", criteria_);

@ -177,7 +177,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (options_.Count > 0) {
output.WriteArray(pbd::FieldType.Enum, 3, "options", options_);
@ -444,7 +444,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}
@ -676,7 +676,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (options_.Count > 0) {
output.WriteArray(pbd::FieldType.Enum, 3, "options", options_);
@ -998,7 +998,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<TestXmlMessage, TestXmlMessage.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
if (HasChild) {
@ -1018,7 +1018,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
extensionWriter.WriteUntil(200, output);
if (children_.Count > 0) {
output.WriteGroupArray(401, "children", children_);
output.WriteArray(pbd::FieldType.Group, 401, "children", children_);
}
if (textlines_.Count > 0) {
output.WriteArray(pbd::FieldType.String, 700, "textlines", textlines_);
@ -1487,7 +1487,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasNumber) {
output.WriteInt32(1, "number", Number);

@ -138,7 +138,7 @@ namespace Google.ProtocolBuffers
/// of the message before the data, then making sure you limit the input to
/// that size when receiving the data. Alternatively, use WriteDelimitedTo(Stream).
/// </remarks>
public override void WriteTo(CodedOutputStream output)
public override void WriteTo(ICodedOutputStream output)
{
foreach (KeyValuePair<FieldDescriptor, object> entry in AllFields)
{
@ -149,26 +149,28 @@ namespace Google.ProtocolBuffers
// IEnumerable is the best we can do. (C# generics aren't covariant yet.)
IEnumerable valueList = (IEnumerable) entry.Value;
if (field.IsPacked)
{
output.WriteTag(field.FieldNumber, WireFormat.WireType.LengthDelimited);
int dataSize = 0;
foreach (object element in valueList)
{
dataSize += CodedOutputStream.ComputeFieldSizeNoTag(field.FieldType, element);
}
output.WriteRawVarint32((uint) dataSize);
foreach (object element in valueList)
{
output.WriteFieldNoTag(field.FieldType, element);
}
}
output.WritePackedArray(field.FieldType, field.FieldNumber, field.Name, valueList);
//{
// output.WriteTag(field.FieldNumber, WireFormat.WireType.LengthDelimited);
// int dataSize = 0;
// foreach (object element in valueList)
// {
// dataSize += CodedOutputStream.ComputeFieldSizeNoTag(field.FieldType, element);
// }
// output.WriteRawVarint32((uint) dataSize);
// foreach (object element in valueList)
// {
// output.WriteFieldNoTag(field.FieldType, element);
// }
//}
else
{
foreach (object element in valueList)
{
output.WriteField(field.FieldType, field.FieldNumber, field.Name, element);
}
}
output.WriteArray(field.FieldType, field.FieldNumber, field.Name, valueList);
//{
// foreach (object element in valueList)
// {
// output.WriteField(field.FieldType, field.FieldNumber, field.Name, element);
// }
//}
}
else
{

@ -55,7 +55,7 @@ namespace Google.ProtocolBuffers
public abstract bool IsInitialized { get; }
public abstract void WriteTo(CodedOutputStream output);
public abstract void WriteTo(ICodedOutputStream output);
public abstract int SerializedSize { get; }
@ -71,7 +71,7 @@ namespace Google.ProtocolBuffers
/// <summary>
/// Serializes the message to a ByteString. This is a trivial wrapper
/// around WriteTo(CodedOutputStream).
/// around WriteTo(ICodedOutputStream).
/// </summary>
public ByteString ToByteString()
{
@ -82,7 +82,7 @@ namespace Google.ProtocolBuffers
/// <summary>
/// Serializes the message to a byte array. This is a trivial wrapper
/// around WriteTo(CodedOutputStream).
/// around WriteTo(ICodedOutputStream).
/// </summary>
public byte[] ToByteArray()
{

@ -308,7 +308,7 @@ namespace Google.ProtocolBuffers
WriteTag(WireFormat.MessageSetField.Item, WireFormat.WireType.EndGroup);
}
public void WriteRawMessageSetExtension(int fieldNumber, ByteString value)
public void WriteMessageSetExtension(int fieldNumber, string fieldName, ByteString value)
{
WriteTag(WireFormat.MessageSetField.Item, WireFormat.WireType.StartGroup);
WriteUInt32(WireFormat.MessageSetField.TypeID, "type_id", (uint) fieldNumber);
@ -316,18 +316,6 @@ namespace Google.ProtocolBuffers
WriteTag(WireFormat.MessageSetField.Item, WireFormat.WireType.EndGroup);
}
public void WriteMessageArray(int fieldNumber, string fieldName, System.Collections.IEnumerable list)
{
foreach (IMessageLite msg in list)
WriteMessage(fieldNumber, fieldName, msg);
}
public void WriteGroupArray(int fieldNumber, string fieldName, System.Collections.IEnumerable list)
{
foreach (IMessageLite msg in list)
WriteGroup(fieldNumber, fieldName, msg);
}
public void WriteArray(FieldType fieldType, int fieldNumber, string fieldName, System.Collections.IEnumerable list)
{
foreach (object element in list)

@ -280,7 +280,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasNamespace) {
output.WriteString(1, "namespace", Namespace);
@ -886,7 +886,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasPropertyName) {
output.WriteString(1, "property_name", PropertyName);
@ -1108,7 +1108,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasInterfaceId) {
output.WriteString(1, "interface_id", InterfaceId);
@ -1330,7 +1330,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasDispatchId) {
output.WriteInt32(1, "dispatch_id", DispatchId);

@ -273,10 +273,10 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (file_.Count > 0) {
output.WriteMessageArray(1, "file", file_);
output.WriteArray(pbd::FieldType.Message, 1, "file", file_);
}
UnknownFields.WriteTo(output);
}
@ -612,7 +612,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasName) {
output.WriteString(1, "name", Name);
@ -624,16 +624,16 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
output.WriteArray(pbd::FieldType.String, 3, "dependency", dependency_);
}
if (messageType_.Count > 0) {
output.WriteMessageArray(4, "message_type", messageType_);
output.WriteArray(pbd::FieldType.Message, 4, "message_type", messageType_);
}
if (enumType_.Count > 0) {
output.WriteMessageArray(5, "enum_type", enumType_);
output.WriteArray(pbd::FieldType.Message, 5, "enum_type", enumType_);
}
if (service_.Count > 0) {
output.WriteMessageArray(6, "service", service_);
output.WriteArray(pbd::FieldType.Message, 6, "service", service_);
}
if (extension_.Count > 0) {
output.WriteMessageArray(7, "extension", extension_);
output.WriteArray(pbd::FieldType.Message, 7, "extension", extension_);
}
if (HasOptions) {
output.WriteMessage(8, "options", Options);
@ -1223,7 +1223,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasStart) {
output.WriteInt32(1, "start", Start);
@ -1538,25 +1538,25 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasName) {
output.WriteString(1, "name", Name);
}
if (field_.Count > 0) {
output.WriteMessageArray(2, "field", field_);
output.WriteArray(pbd::FieldType.Message, 2, "field", field_);
}
if (nestedType_.Count > 0) {
output.WriteMessageArray(3, "nested_type", nestedType_);
output.WriteArray(pbd::FieldType.Message, 3, "nested_type", nestedType_);
}
if (enumType_.Count > 0) {
output.WriteMessageArray(4, "enum_type", enumType_);
output.WriteArray(pbd::FieldType.Message, 4, "enum_type", enumType_);
}
if (extensionRange_.Count > 0) {
output.WriteMessageArray(5, "extension_range", extensionRange_);
output.WriteArray(pbd::FieldType.Message, 5, "extension_range", extensionRange_);
}
if (extension_.Count > 0) {
output.WriteMessageArray(6, "extension", extension_);
output.WriteArray(pbd::FieldType.Message, 6, "extension", extension_);
}
if (HasOptions) {
output.WriteMessage(7, "options", Options);
@ -2196,7 +2196,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasName) {
output.WriteString(1, "name", Name);
@ -2705,13 +2705,13 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasName) {
output.WriteString(1, "name", Name);
}
if (value_.Count > 0) {
output.WriteMessageArray(2, "value", value_);
output.WriteArray(pbd::FieldType.Message, 2, "value", value_);
}
if (HasOptions) {
output.WriteMessage(3, "options", Options);
@ -3058,7 +3058,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasName) {
output.WriteString(1, "name", Name);
@ -3393,13 +3393,13 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasName) {
output.WriteString(1, "name", Name);
}
if (method_.Count > 0) {
output.WriteMessageArray(2, "method", method_);
output.WriteArray(pbd::FieldType.Message, 2, "method", method_);
}
if (HasOptions) {
output.WriteMessage(3, "options", Options);
@ -3756,7 +3756,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasName) {
output.WriteString(1, "name", Name);
@ -4188,7 +4188,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<FileOptions, FileOptions.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
if (HasJavaPackage) {
@ -4213,7 +4213,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
output.WriteBool(18, "py_generic_services", PyGenericServices);
}
if (uninterpretedOption_.Count > 0) {
output.WriteMessageArray(999, "uninterpreted_option", uninterpretedOption_);
output.WriteArray(pbd::FieldType.Message, 999, "uninterpreted_option", uninterpretedOption_);
}
extensionWriter.WriteUntil(536870912, output);
UnknownFields.WriteTo(output);
@ -4689,7 +4689,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<MessageOptions, MessageOptions.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
if (HasMessageSetWireFormat) {
@ -4699,7 +4699,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
output.WriteBool(2, "no_standard_descriptor_accessor", NoStandardDescriptorAccessor);
}
if (uninterpretedOption_.Count > 0) {
output.WriteMessageArray(999, "uninterpreted_option", uninterpretedOption_);
output.WriteArray(pbd::FieldType.Message, 999, "uninterpreted_option", uninterpretedOption_);
}
extensionWriter.WriteUntil(536870912, output);
UnknownFields.WriteTo(output);
@ -5061,7 +5061,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<FieldOptions, FieldOptions.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
if (HasCtype) {
@ -5077,7 +5077,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
output.WriteString(9, "experimental_map_key", ExperimentalMapKey);
}
if (uninterpretedOption_.Count > 0) {
output.WriteMessageArray(999, "uninterpreted_option", uninterpretedOption_);
output.WriteArray(pbd::FieldType.Message, 999, "uninterpreted_option", uninterpretedOption_);
}
extensionWriter.WriteUntil(536870912, output);
UnknownFields.WriteTo(output);
@ -5448,11 +5448,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<EnumOptions, EnumOptions.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
if (uninterpretedOption_.Count > 0) {
output.WriteMessageArray(999, "uninterpreted_option", uninterpretedOption_);
output.WriteArray(pbd::FieldType.Message, 999, "uninterpreted_option", uninterpretedOption_);
}
extensionWriter.WriteUntil(536870912, output);
UnknownFields.WriteTo(output);
@ -5702,11 +5702,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<EnumValueOptions, EnumValueOptions.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
if (uninterpretedOption_.Count > 0) {
output.WriteMessageArray(999, "uninterpreted_option", uninterpretedOption_);
output.WriteArray(pbd::FieldType.Message, 999, "uninterpreted_option", uninterpretedOption_);
}
extensionWriter.WriteUntil(536870912, output);
UnknownFields.WriteTo(output);
@ -5956,11 +5956,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<ServiceOptions, ServiceOptions.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
if (uninterpretedOption_.Count > 0) {
output.WriteMessageArray(999, "uninterpreted_option", uninterpretedOption_);
output.WriteArray(pbd::FieldType.Message, 999, "uninterpreted_option", uninterpretedOption_);
}
extensionWriter.WriteUntil(536870912, output);
UnknownFields.WriteTo(output);
@ -6210,11 +6210,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<MethodOptions, MethodOptions.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
if (uninterpretedOption_.Count > 0) {
output.WriteMessageArray(999, "uninterpreted_option", uninterpretedOption_);
output.WriteArray(pbd::FieldType.Message, 999, "uninterpreted_option", uninterpretedOption_);
}
extensionWriter.WriteUntil(536870912, output);
UnknownFields.WriteTo(output);
@ -6500,7 +6500,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasNamePart_) {
output.WriteString(1, "name_part", NamePart_);
@ -6787,10 +6787,10 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (name_.Count > 0) {
output.WriteMessageArray(2, "name", name_);
output.WriteArray(pbd::FieldType.Message, 2, "name", name_);
}
if (HasIdentifierValue) {
output.WriteString(3, "identifier_value", IdentifierValue);

@ -246,7 +246,7 @@ namespace Google.ProtocolBuffers
get { return fields.IsInitializedWithRespectTo(type.Fields); }
}
public override void WriteTo(CodedOutputStream output)
public override void WriteTo(ICodedOutputStream output)
{
fields.WriteTo(output);
if (type.Options.MessageSetWireFormat)

@ -230,7 +230,7 @@ namespace Google.ProtocolBuffers
}
}
public void WriteUntil(int end, CodedOutputStream output)
public void WriteUntil(int end, ICodedOutputStream output)
{
while (next != null && next.Value.Key.FieldNumber < end)
{

@ -173,7 +173,7 @@ namespace Google.ProtocolBuffers
}
}
public void WriteUntil(int end, CodedOutputStream output)
public void WriteUntil(int end, ICodedOutputStream output)
{
while (next != null && next.Value.Key.FieldNumber < end)
{

@ -455,7 +455,7 @@ namespace Google.ProtocolBuffers
/// <summary>
/// See <see cref="IMessageLite.WriteTo(CodedOutputStream)" />.
/// </summary>
public void WriteTo(CodedOutputStream output)
public void WriteTo(ICodedOutputStream output)
{
foreach (KeyValuePair<IFieldDescriptorLite, object> entry in fields)
{
@ -466,7 +466,7 @@ namespace Google.ProtocolBuffers
/// <summary>
/// Writes a single field to a CodedOutputStream.
/// </summary>
public void WriteField(IFieldDescriptorLite field, Object value, CodedOutputStream output)
public void WriteField(IFieldDescriptorLite field, Object value, ICodedOutputStream output)
{
if (field.IsExtension && field.MessageSetWireFormat)
{
@ -478,28 +478,30 @@ namespace Google.ProtocolBuffers
{
IEnumerable valueList = (IEnumerable) value;
if (field.IsPacked)
{
output.WriteTag(field.FieldNumber, WireFormat.WireType.LengthDelimited);
// Compute the total data size so the length can be written.
int dataSize = 0;
foreach (object element in valueList)
{
dataSize += CodedOutputStream.ComputeFieldSizeNoTag(field.FieldType, element);
}
output.WriteRawVarint32((uint) dataSize);
// Write the data itself, without any tags.
foreach (object element in valueList)
{
output.WriteFieldNoTag(field.FieldType, element);
}
}
output.WritePackedArray(field.FieldType, field.FieldNumber, field.Name, valueList);
//{
// output.WriteTag(field.FieldNumber, WireFormat.WireType.LengthDelimited);
// // Compute the total data size so the length can be written.
// int dataSize = 0;
// foreach (object element in valueList)
// {
// dataSize += CodedOutputStream.ComputeFieldSizeNoTag(field.FieldType, element);
// }
// output.WriteRawVarint32((uint) dataSize);
// // Write the data itself, without any tags.
// foreach (object element in valueList)
// {
// output.WriteFieldNoTag(field.FieldType, element);
// }
//}
else
{
foreach (object element in valueList)
{
output.WriteField(field.FieldType, field.FieldNumber, field.Name, element);
}
}
output.WriteArray(field.FieldType, field.FieldNumber, field.Name, valueList);
//{
// foreach (object element in valueList)
// {
// output.WriteField(field.FieldType, field.FieldNumber, field.Name, element);
// }
//}
}
else
{

@ -1,6 +1,9 @@
using System;
using Google.ProtocolBuffers.Descriptors;
//Disable warning CS3010: CLS-compliant interfaces must have only CLS-compliant members
#pragma warning disable 3010
namespace Google.ProtocolBuffers
{
public interface ICodedOutputStream
@ -73,8 +76,7 @@ namespace Google.ProtocolBuffers
void WriteSInt32(int fieldNumber, string fieldName, int value);
void WriteSInt64(int fieldNumber, string fieldName, long value);
void WriteMessageSetExtension(int fieldNumber, string fieldName, IMessageLite value);
void WriteMessageArray(int fieldNumber, string fieldName, System.Collections.IEnumerable list);
void WriteGroupArray(int fieldNumber, string fieldName, System.Collections.IEnumerable list);
void WriteMessageSetExtension(int fieldNumber, string fieldName, ByteString value);
void WriteArray(FieldType fieldType, int fieldNumber, string fieldName, System.Collections.IEnumerable list);
void WritePackedArray(FieldType fieldType, int fieldNumber, string fieldName, System.Collections.IEnumerable list);
void WritePackedArray(FieldType fieldType, int fieldNumber, string fieldName, int calculatedSize, System.Collections.IEnumerable list);

@ -128,7 +128,7 @@ namespace Google.ProtocolBuffers
/// of the message before the data, then making sure you limit the input to
/// that size when receiving the data. Alternatively, use WriteDelimitedTo(Stream).
/// </remarks>
new void WriteTo(CodedOutputStream output);
new void WriteTo(ICodedOutputStream output);
/// <summary>
/// Like WriteTo(Stream) but writes the size of the message as a varint before
@ -174,19 +174,19 @@ namespace Google.ProtocolBuffers
/// <summary>
/// Serializes the message to a ByteString. This is a trivial wrapper
/// around WriteTo(CodedOutputStream).
/// around WriteTo(ICodedOutputStream).
/// </summary>
new ByteString ToByteString();
/// <summary>
/// Serializes the message to a byte array. This is a trivial wrapper
/// around WriteTo(CodedOutputStream).
/// around WriteTo(ICodedOutputStream).
/// </summary>
new byte[] ToByteArray();
/// <summary>
/// Serializes the message and writes it to the given stream.
/// This is just a wrapper around WriteTo(CodedOutputStream). This
/// This is just a wrapper around WriteTo(ICodedOutputStream). This
/// does not flush or close the stream.
/// </summary>
/// <param name="output"></param>

@ -64,7 +64,7 @@ namespace Google.ProtocolBuffers
/// of the message before the data, then making sure you limit the input to
/// that size when receiving the data. Alternatively, use WriteDelimitedTo(Stream).
/// </remarks>
void WriteTo(CodedOutputStream output);
void WriteTo(ICodedOutputStream output);
/// <summary>
/// Like WriteTo(Stream) but writes the size of the message as a varint before
@ -115,19 +115,19 @@ namespace Google.ProtocolBuffers
/// <summary>
/// Serializes the message to a ByteString. This is a trivial wrapper
/// around WriteTo(CodedOutputStream).
/// around WriteTo(ICodedOutputStream).
/// </summary>
ByteString ToByteString();
/// <summary>
/// Serializes the message to a byte array. This is a trivial wrapper
/// around WriteTo(CodedOutputStream).
/// around WriteTo(ICodedOutputStream).
/// </summary>
byte[] ToByteArray();
/// <summary>
/// Serializes the message and writes it to the given stream.
/// This is just a wrapper around WriteTo(CodedOutputStream). This
/// This is just a wrapper around WriteTo(ICodedOutputStream). This
/// does not flush or close the stream.
/// </summary>
/// <param name="output"></param>

@ -1,120 +1,122 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{6969BDCE-D925-43F3-94AC-A531E6DF2591}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers</RootNamespace>
<AssemblyName>Google.ProtocolBuffersLite</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>TRACE;DEBUG;LITE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>TRACE;LITE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug_Silverlight2|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug_Silverlight2\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT2;LITE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_Silverlight2|AnyCPU'">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release_Silverlight2\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>TRACE;SILVERLIGHT2;LITE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
</ItemGroup>
<ItemGroup>
<Compile Include="AbstractBuilderLite.cs" />
<Compile Include="AbstractMessageLite.cs" />
<Compile Include="Collections\Dictionaries.cs" />
<Compile Include="Collections\Enumerables.cs" />
<Compile Include="Collections\IPopsicleList.cs" />
<Compile Include="Collections\Lists.cs" />
<Compile Include="Collections\PopsicleList.cs" />
<Compile Include="Collections\ReadOnlyDictionary.cs" />
<Compile Include="Descriptors\FieldMappingAttribute.cs" />
<Compile Include="Descriptors\FieldType.cs" />
<Compile Include="Descriptors\MappedType.cs" />
<Compile Include="EnumLite.cs" />
<Compile Include="ExtendableBuilderLite.cs" />
<Compile Include="ExtendableMessageLite.cs" />
<Compile Include="FieldSet.cs" />
<Compile Include="GeneratedBuilderLite.cs" />
<Compile Include="GeneratedExtensionLite.cs" />
<Compile Include="GeneratedMessageLite.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ByteString.cs" />
<Compile Include="CodedInputStream.cs" />
<Compile Include="CodedOutputStream.cs" />
<Compile Include="ExtensionRegistryLite.cs" />
<Compile Include="IBuilderLite.cs" />
<Compile Include="IMessageLite.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="InvalidProtocolBufferException.cs" />
<Compile Include="ThrowHelper.cs" />
<Compile Include="UninitializedMessageException.cs" />
<Compile Include="WireFormat.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition=" '$(Configuration)' != 'Silverlight2' " />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" Condition=" '$(Configuration)' == 'Silverlight2' " />
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{6969BDCE-D925-43F3-94AC-A531E6DF2591}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers</RootNamespace>
<AssemblyName>Google.ProtocolBuffersLite</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>TRACE;DEBUG;LITE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>TRACE;LITE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug_Silverlight2|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug_Silverlight2\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT2;LITE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_Silverlight2|AnyCPU'">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release_Silverlight2\</OutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>TRACE;SILVERLIGHT2;LITE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
</ItemGroup>
<ItemGroup>
<Compile Include="AbstractBuilderLite.cs" />
<Compile Include="AbstractMessageLite.cs" />
<Compile Include="CodedOutputStream.ComputeSize.cs" />
<Compile Include="Collections\Dictionaries.cs" />
<Compile Include="Collections\Enumerables.cs" />
<Compile Include="Collections\IPopsicleList.cs" />
<Compile Include="Collections\Lists.cs" />
<Compile Include="Collections\PopsicleList.cs" />
<Compile Include="Collections\ReadOnlyDictionary.cs" />
<Compile Include="Descriptors\FieldMappingAttribute.cs" />
<Compile Include="Descriptors\FieldType.cs" />
<Compile Include="Descriptors\MappedType.cs" />
<Compile Include="EnumLite.cs" />
<Compile Include="ExtendableBuilderLite.cs" />
<Compile Include="ExtendableMessageLite.cs" />
<Compile Include="FieldSet.cs" />
<Compile Include="GeneratedBuilderLite.cs" />
<Compile Include="GeneratedExtensionLite.cs" />
<Compile Include="GeneratedMessageLite.cs" />
<Compile Include="ICodedOutputStream.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ByteString.cs" />
<Compile Include="CodedInputStream.cs" />
<Compile Include="CodedOutputStream.cs" />
<Compile Include="ExtensionRegistryLite.cs" />
<Compile Include="IBuilderLite.cs" />
<Compile Include="IMessageLite.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="InvalidProtocolBufferException.cs" />
<Compile Include="ThrowHelper.cs" />
<Compile Include="UninitializedMessageException.cs" />
<Compile Include="WireFormat.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition=" '$(Configuration)' != 'Silverlight2' " />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" Condition=" '$(Configuration)' == 'Silverlight2' " />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
-->
</Project>

@ -174,7 +174,7 @@ namespace Google.ProtocolBuffers
/// Serializes the field, including the field number, and writes it to
/// <paramref name="output"/>.
/// </summary>
public void WriteTo(int fieldNumber, CodedOutputStream output)
public void WriteTo(int fieldNumber, ICodedOutputStream output)
{
foreach (ulong value in varintList)
{
@ -238,11 +238,11 @@ namespace Google.ProtocolBuffers
/// </summary>
/// <param name="fieldNumber"></param>
/// <param name="output"></param>
public void WriteAsMessageSetExtensionTo(int fieldNumber, CodedOutputStream output)
public void WriteAsMessageSetExtensionTo(int fieldNumber, ICodedOutputStream output)
{
foreach (ByteString value in lengthDelimitedList)
{
output.WriteRawMessageSetExtension(fieldNumber, value);
output.WriteMessageSetExtension(fieldNumber, UnknownFieldName, value);
}
}

@ -124,7 +124,7 @@ namespace Google.ProtocolBuffers
/// <summary>
/// Serializes the set and writes it to <paramref name="output"/>.
/// </summary>
public void WriteTo(CodedOutputStream output)
public void WriteTo(ICodedOutputStream output)
{
foreach (KeyValuePair<int, UnknownField> entry in fields)
{
@ -168,7 +168,7 @@ namespace Google.ProtocolBuffers
/// <summary>
/// Serializes the message to a ByteString and returns it. This is
/// just a trivial wrapper around WriteTo(CodedOutputStream).
/// just a trivial wrapper around WriteTo(ICodedOutputStream).
/// </summary>
/// <returns></returns>
public ByteString ToByteString()
@ -180,7 +180,7 @@ namespace Google.ProtocolBuffers
/// <summary>
/// Serializes the message to a byte array and returns it. This is
/// just a trivial wrapper around WriteTo(CodedOutputStream).
/// just a trivial wrapper around WriteTo(ICodedOutputStream).
/// </summary>
/// <returns></returns>
public byte[] ToByteArray()
@ -194,7 +194,7 @@ namespace Google.ProtocolBuffers
/// <summary>
/// Serializes the message and writes it to <paramref name="output"/>. This is
/// just a trivial wrapper around WriteTo(CodedOutputStream).
/// just a trivial wrapper around WriteTo(ICodedOutputStream).
/// </summary>
/// <param name="output"></param>
public void WriteTo(Stream output)
@ -208,7 +208,7 @@ namespace Google.ProtocolBuffers
/// Serializes the set and writes it to <paramref name="output"/> using
/// the MessageSet wire format.
/// </summary>
public void WriteAsMessageSetTo(CodedOutputStream output)
public void WriteAsMessageSetTo(ICodedOutputStream output)
{
foreach (KeyValuePair<int, UnknownField> entry in fields)
{

@ -98,7 +98,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasD) {
output.WriteInt32(1, "d", D);
@ -392,7 +392,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasNumber) {
output.WriteString(1, "number", Number);
@ -691,7 +691,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasAddress) {
output.WriteString(1, "address", Address);
@ -1097,7 +1097,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessageLite<TestInteropPersonLite, TestInteropPersonLite.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
if (HasName) {
@ -1110,10 +1110,10 @@ namespace Google.ProtocolBuffers.TestProtos {
output.WriteString(3, "email", Email);
}
if (phone_.Count > 0) {
output.WriteMessageArray(4, "phone", phone_);
output.WriteArray(pbd::FieldType.Message, 4, "phone", phone_);
}
if (addresses_.Count > 0) {
output.WriteGroupArray(5, "addresses", addresses_);
output.WriteArray(pbd::FieldType.Group, 5, "addresses", addresses_);
}
if (codes_.Count > 0) {
output.WritePackedArray(pbd::FieldType.Int32, 10, "codes", codesMemoizedSerializedSize, codes_);
@ -1569,7 +1569,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasNumber) {
output.WriteString(1, "number", Number);

@ -70,7 +70,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasD) {
output.WriteInt32(1, "d", D);

@ -106,7 +106,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasD) {
output.WriteInt32(1, "d", D);

@ -59,7 +59,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasMessage) {
output.WriteMessage(1, "message", Message);

@ -1113,7 +1113,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasBb) {
output.WriteInt32(1, "bb", Bb);
@ -1328,7 +1328,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(17, "a", A);
@ -1543,7 +1543,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(47, "a", A);
@ -2478,7 +2478,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasOptionalInt32) {
output.WriteInt32(1, "optional_int32", OptionalInt32);
@ -2598,16 +2598,16 @@ namespace Google.ProtocolBuffers.TestProtos {
output.WriteArray(pbd::FieldType.Bytes, 45, "repeated_bytes", repeatedBytes_);
}
if (repeatedGroup_.Count > 0) {
output.WriteGroupArray(46, "repeatedgroup", repeatedGroup_);
output.WriteArray(pbd::FieldType.Group, 46, "repeatedgroup", repeatedGroup_);
}
if (repeatedNestedMessage_.Count > 0) {
output.WriteMessageArray(48, "repeated_nested_message", repeatedNestedMessage_);
output.WriteArray(pbd::FieldType.Message, 48, "repeated_nested_message", repeatedNestedMessage_);
}
if (repeatedForeignMessage_.Count > 0) {
output.WriteMessageArray(49, "repeated_foreign_message", repeatedForeignMessage_);
output.WriteArray(pbd::FieldType.Message, 49, "repeated_foreign_message", repeatedForeignMessage_);
}
if (repeatedImportMessage_.Count > 0) {
output.WriteMessageArray(50, "repeated_import_message", repeatedImportMessage_);
output.WriteArray(pbd::FieldType.Message, 50, "repeated_import_message", repeatedImportMessage_);
}
if (repeatedNestedEnum_.Count > 0) {
output.WriteArray(pbd::FieldType.Enum, 51, "repeated_nested_enum", repeatedNestedEnum_);
@ -5587,7 +5587,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasC) {
output.WriteInt32(1, "c", C);
@ -5982,7 +5982,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (packedInt32_.Count > 0) {
output.WritePackedArray(pbd::FieldType.Int32, 90, "packed_int32", packedInt32MemoizedSerializedSize, packedInt32_);
@ -6991,7 +6991,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessageLite<TestAllExtensionsLite, TestAllExtensionsLite.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
extensionWriter.WriteUntil(536870912, output);
@ -7179,7 +7179,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(17, "a", A);
@ -7394,7 +7394,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(47, "a", A);
@ -7600,7 +7600,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessageLite<TestPackedExtensionsLite, TestPackedExtensionsLite.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
extensionWriter.WriteUntil(536870912, output);
@ -7780,7 +7780,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
}
@ -7961,7 +7961,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasDeprecatedField) {
output.WriteInt32(1, "deprecated_field", DeprecatedField);

@ -1103,7 +1103,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasBb) {
output.WriteInt32(1, "bb", Bb);
@ -1324,7 +1324,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(17, "a", A);
@ -1545,7 +1545,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(47, "a", A);
@ -2478,7 +2478,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasOptionalInt32) {
output.WriteInt32(1, "optional_int32", OptionalInt32);
@ -2598,16 +2598,16 @@ namespace Google.ProtocolBuffers.TestProtos {
output.WriteArray(pbd::FieldType.Bytes, 45, "repeated_bytes", repeatedBytes_);
}
if (repeatedGroup_.Count > 0) {
output.WriteGroupArray(46, "repeatedgroup", repeatedGroup_);
output.WriteArray(pbd::FieldType.Group, 46, "repeatedgroup", repeatedGroup_);
}
if (repeatedNestedMessage_.Count > 0) {
output.WriteMessageArray(48, "repeated_nested_message", repeatedNestedMessage_);
output.WriteArray(pbd::FieldType.Message, 48, "repeated_nested_message", repeatedNestedMessage_);
}
if (repeatedForeignMessage_.Count > 0) {
output.WriteMessageArray(49, "repeated_foreign_message", repeatedForeignMessage_);
output.WriteArray(pbd::FieldType.Message, 49, "repeated_foreign_message", repeatedForeignMessage_);
}
if (repeatedImportMessage_.Count > 0) {
output.WriteMessageArray(50, "repeated_import_message", repeatedImportMessage_);
output.WriteArray(pbd::FieldType.Message, 50, "repeated_import_message", repeatedImportMessage_);
}
if (repeatedNestedEnum_.Count > 0) {
output.WriteArray(pbd::FieldType.Enum, 51, "repeated_nested_enum", repeatedNestedEnum_);
@ -5356,7 +5356,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasDeprecatedInt32) {
output.WriteInt32(1, "deprecated_int32", DeprecatedInt32);
@ -5577,7 +5577,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasC) {
output.WriteInt32(1, "c", C);
@ -5789,7 +5789,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<TestAllExtensions, TestAllExtensions.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
extensionWriter.WriteUntil(536870912, output);
@ -5983,7 +5983,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(17, "a", A);
@ -6204,7 +6204,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(47, "a", A);
@ -6417,7 +6417,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}
@ -6934,7 +6934,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(1, "a", A);
@ -8175,13 +8175,13 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasOptionalMessage) {
output.WriteMessage(1, "optional_message", OptionalMessage);
}
if (repeatedMessage_.Count > 0) {
output.WriteMessageArray(2, "repeated_message", repeatedMessage_);
output.WriteArray(pbd::FieldType.Message, 2, "repeated_message", repeatedMessage_);
}
if (HasDummy) {
output.WriteInt32(3, "dummy", Dummy);
@ -8504,7 +8504,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasForeignNested) {
output.WriteMessage(1, "foreign_nested", ForeignNested);
@ -8738,7 +8738,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}
@ -8919,7 +8919,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<TestEmptyMessageWithExtensions, TestEmptyMessageWithExtensions.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
extensionWriter.WriteUntil(536870912, output);
@ -9104,7 +9104,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<TestMultipleExtensionRanges, TestMultipleExtensionRanges.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
extensionWriter.WriteUntil(43, output);
@ -9310,7 +9310,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(1, "a", A);
@ -9572,7 +9572,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteMessage(1, "a", A);
@ -9847,7 +9847,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasBb) {
output.WriteMessage(1, "bb", Bb);
@ -10101,7 +10101,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteMessage(1, "a", A);
@ -10406,7 +10406,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(1, "a", A);
@ -10627,7 +10627,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(1, "a", A);
@ -10846,7 +10846,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasA) {
output.WriteInt32(1, "a", A);
@ -11219,13 +11219,13 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (nestedmessageRepeatedInt32_.Count > 0) {
output.WriteArray(pbd::FieldType.Int32, 1, "nestedmessage_repeated_int32", nestedmessageRepeatedInt32_);
}
if (nestedmessageRepeatedForeignmessage_.Count > 0) {
output.WriteMessageArray(2, "nestedmessage_repeated_foreignmessage", nestedmessageRepeatedForeignmessage_);
output.WriteArray(pbd::FieldType.Message, 2, "nestedmessage_repeated_foreignmessage", nestedmessageRepeatedForeignmessage_);
}
UnknownFields.WriteTo(output);
}
@ -11486,7 +11486,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasOptionalNestedMessage) {
output.WriteMessage(1, "optional_nested_message", OptionalNestedMessage);
@ -11852,7 +11852,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasPrimitiveField) {
output.WriteInt32(1, "PrimitiveField", PrimitiveField);
@ -11882,7 +11882,7 @@ namespace Google.ProtocolBuffers.TestProtos {
output.WriteArray(pbd::FieldType.Enum, 9, "RepeatedEnumField", repeatedEnumField_);
}
if (repeatedMessageField_.Count > 0) {
output.WriteMessageArray(10, "RepeatedMessageField", repeatedMessageField_);
output.WriteArray(pbd::FieldType.Message, 10, "RepeatedMessageField", repeatedMessageField_);
}
if (repeatedStringPieceField_.Count > 0) {
output.WriteArray(pbd::FieldType.String, 11, "RepeatedStringPieceField", repeatedStringPieceField_);
@ -12578,7 +12578,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<TestFieldOrderings, TestFieldOrderings.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
if (HasMyInt) {
@ -13049,7 +13049,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasEscapedBytes) {
output.WriteBytes(1, "escaped_bytes", EscapedBytes);
@ -13834,7 +13834,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasData) {
output.WriteString(1, "data", Data);
@ -14056,7 +14056,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasData) {
output.WriteBytes(1, "data", Data);
@ -14458,7 +14458,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (packedInt32_.Count > 0) {
output.WritePackedArray(pbd::FieldType.Int32, 90, "packed_int32", packedInt32MemoizedSerializedSize, packedInt32_);
@ -15571,7 +15571,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (unpackedInt32_.Count > 0) {
output.WriteArray(pbd::FieldType.Int32, 90, "unpacked_int32", unpackedInt32_);
@ -16398,7 +16398,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
pb::ExtendableMessage<TestPackedExtensions, TestPackedExtensions.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
extensionWriter.WriteUntil(536870912, output);
@ -16630,7 +16630,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasDynamicField) {
output.WriteInt32(2100, "dynamic_field", DynamicField);
@ -16895,7 +16895,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (HasScalarExtension) {
output.WriteFixed32(2000, "scalar_extension", ScalarExtension);
@ -17472,7 +17472,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
if (repeatedFixed32_.Count > 0) {
output.WriteArray(pbd::FieldType.Fixed32, 12, "repeated_fixed32", repeatedFixed32_);
@ -17931,7 +17931,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}
@ -18111,7 +18111,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}
@ -18291,7 +18291,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}
@ -18471,7 +18471,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
}
public override void WriteTo(pb::CodedOutputStream output) {
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
UnknownFields.WriteTo(output);
}

Loading…
Cancel
Save