diff options
author | csharptest <roger@csharptest.net> | 2011-09-16 12:21:00 -0500 |
---|---|---|
committer | rogerk <devnull@localhost> | 2011-09-16 12:21:00 -0500 |
commit | 4ecebd8b4a34c1f902176395024185f1724cb2eb (patch) | |
tree | b66dbd1ef1b8fc8f4b4813f4ac7522fc25d637dc | |
parent | 8f0dcf3df1548a1eff0bed54a9b992f55b8f72d5 (diff) | |
download | protobuf-4ecebd8b4a34c1f902176395024185f1724cb2eb.tar.gz protobuf-4ecebd8b4a34c1f902176395024185f1724cb2eb.tar.bz2 protobuf-4ecebd8b4a34c1f902176395024185f1724cb2eb.zip |
Tests and fixes for double-enumeration on AddRange and adding of null to PopsicleList
22 files changed, 703 insertions, 544 deletions
diff --git a/src/AddressBook/AddressBookProtos.cs b/src/AddressBook/AddressBookProtos.cs index 4d391f0f..7df3a7d4 100644 --- a/src/AddressBook/AddressBookProtos.cs +++ b/src/AddressBook/AddressBookProtos.cs @@ -593,7 +593,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook { Email = other.Email;
}
if (other.phone_.Count != 0) {
- base.AddRange(other.phone_, result.phone_);
+ result.phone_.Add(other.phone_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -749,7 +749,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook { return this;
}
public Builder AddRangePhone(scg::IEnumerable<global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber> values) {
- base.AddRange(values, result.phone_);
+ result.phone_.Add(values);
return this;
}
public Builder ClearPhone() {
@@ -926,7 +926,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook { public override Builder MergeFrom(AddressBook other) {
if (other == global::Google.ProtocolBuffers.Examples.AddressBook.AddressBook.DefaultInstance) return this;
if (other.person_.Count != 0) {
- base.AddRange(other.person_, result.person_);
+ result.person_.Add(other.person_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -1014,7 +1014,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook { return this;
}
public Builder AddRangePerson(scg::IEnumerable<global::Google.ProtocolBuffers.Examples.AddressBook.Person> values) {
- base.AddRange(values, result.person_);
+ result.person_.Add(values);
return this;
}
public Builder ClearPerson() {
diff --git a/src/ProtoGen/RepeatedEnumFieldGenerator.cs b/src/ProtoGen/RepeatedEnumFieldGenerator.cs index 5880390b..339e8181 100644 --- a/src/ProtoGen/RepeatedEnumFieldGenerator.cs +++ b/src/ProtoGen/RepeatedEnumFieldGenerator.cs @@ -88,7 +88,7 @@ namespace Google.ProtocolBuffers.ProtoGen writer.WriteLine(" return this;");
writer.WriteLine("}");
writer.WriteLine("public Builder AddRange{0}(scg::IEnumerable<{1}> values) {{", PropertyName, TypeName);
- writer.WriteLine(" base.AddRange(values, result.{0}_);", Name);
+ writer.WriteLine(" result.{0}_.Add(values);", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
writer.WriteLine("public Builder Clear{0}() {{", PropertyName);
@@ -100,7 +100,7 @@ namespace Google.ProtocolBuffers.ProtoGen public void GenerateMergingCode(TextGenerator writer)
{
writer.WriteLine("if (other.{0}_.Count != 0) {{", Name);
- writer.WriteLine(" base.AddRange(other.{0}_, result.{0}_);", Name);
+ writer.WriteLine(" result.{0}_.Add(other.{0}_);", Name);
writer.WriteLine("}");
}
diff --git a/src/ProtoGen/RepeatedMessageFieldGenerator.cs b/src/ProtoGen/RepeatedMessageFieldGenerator.cs index bfa0763f..e68e77df 100644 --- a/src/ProtoGen/RepeatedMessageFieldGenerator.cs +++ b/src/ProtoGen/RepeatedMessageFieldGenerator.cs @@ -98,7 +98,7 @@ namespace Google.ProtocolBuffers.ProtoGen writer.WriteLine(" return this;");
writer.WriteLine("}");
writer.WriteLine("public Builder AddRange{0}(scg::IEnumerable<{1}> values) {{", PropertyName, TypeName);
- writer.WriteLine(" base.AddRange(values, result.{0}_);", Name);
+ writer.WriteLine(" result.{0}_.Add(values);", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
writer.WriteLine("public Builder Clear{0}() {{", PropertyName);
@@ -110,7 +110,7 @@ namespace Google.ProtocolBuffers.ProtoGen public void GenerateMergingCode(TextGenerator writer)
{
writer.WriteLine("if (other.{0}_.Count != 0) {{", Name);
- writer.WriteLine(" base.AddRange(other.{0}_, result.{0}_);", Name);
+ writer.WriteLine(" result.{0}_.Add(other.{0}_);", Name);
writer.WriteLine("}");
}
diff --git a/src/ProtoGen/RepeatedPrimitiveFieldGenerator.cs b/src/ProtoGen/RepeatedPrimitiveFieldGenerator.cs index 9e7f5f64..a397375c 100644 --- a/src/ProtoGen/RepeatedPrimitiveFieldGenerator.cs +++ b/src/ProtoGen/RepeatedPrimitiveFieldGenerator.cs @@ -97,7 +97,7 @@ namespace Google.ProtocolBuffers.ProtoGen writer.WriteLine("}");
AddClsComplianceCheck(writer);
writer.WriteLine("public Builder AddRange{0}(scg::IEnumerable<{1}> values) {{", PropertyName, TypeName);
- writer.WriteLine(" base.AddRange(values, result.{0}_);", Name);
+ writer.WriteLine(" result.{0}_.Add(values);", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
writer.WriteLine("public Builder Clear{0}() {{", PropertyName);
@@ -109,7 +109,7 @@ namespace Google.ProtocolBuffers.ProtoGen public void GenerateMergingCode(TextGenerator writer)
{
writer.WriteLine("if (other.{0}_.Count != 0) {{", Name);
- writer.WriteLine(" base.AddRange(other.{0}_, result.{0}_);", Name);
+ writer.WriteLine(" result.{0}_.Add(other.{0}_);", Name);
writer.WriteLine("}");
}
diff --git a/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs b/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs index c339cef6..35b13a1d 100644 --- a/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs +++ b/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs @@ -35,6 +35,7 @@ #endregion
using System;
+using System.Collections.Generic;
using NUnit.Framework;
internal delegate void Action();
@@ -94,6 +95,64 @@ namespace Google.ProtocolBuffers.Collections Assert.IsFalse(list.IsReadOnly);
}
+ [Test]
+ public void DoesNotAddNullEnumerable()
+ {
+ PopsicleList<string> list = new PopsicleList<string>();
+ try
+ {
+ list.Add((IEnumerable<string>)null);
+ }
+ catch (ArgumentNullException)
+ { return; }
+
+ Assert.Fail("List should not allow nulls.");
+ }
+
+ [Test]
+ public void DoesNotAddRangeWithNull()
+ {
+ PopsicleList<string> list = new PopsicleList<string>();
+ try
+ {
+ list.Add(new[] { "a", "b", null });
+ }
+ catch (ArgumentNullException)
+ { return; }
+
+ Assert.Fail("List should not allow nulls.");
+ }
+
+ [Test]
+ public void DoesNotAddNull()
+ {
+ PopsicleList<string> list = new PopsicleList<string>();
+ try
+ {
+ list.Add((string)null);
+ }
+ catch (ArgumentNullException)
+ { return; }
+
+ Assert.Fail("List should not allow nulls.");
+ }
+
+ [Test]
+ public void DoesNotSetNull()
+ {
+ PopsicleList<string> list = new PopsicleList<string>();
+ list.Add("a");
+ try
+ {
+ list[0] = null;
+ }
+ catch (ArgumentNullException)
+ { return; }
+
+ Assert.Fail("List should not allow nulls.");
+ }
+
+
private static void AssertNotSupported(Action action)
{
try
diff --git a/src/ProtocolBuffers.Test/GeneratedBuilderTest.cs b/src/ProtocolBuffers.Test/GeneratedBuilderTest.cs new file mode 100644 index 00000000..b1290031 --- /dev/null +++ b/src/ProtocolBuffers.Test/GeneratedBuilderTest.cs @@ -0,0 +1,123 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using Google.ProtocolBuffers.TestProtos;
+using NUnit.Framework;
+
+namespace Google.ProtocolBuffers
+{
+ [TestFixture]
+ public class GeneratedBuilderTest
+ {
+ class OneTimeEnumerator<T> : IEnumerable<T>
+ {
+ readonly T _item;
+ bool _enumerated;
+ public OneTimeEnumerator(T item)
+ {
+ _item = item;
+ }
+ public IEnumerator<T> GetEnumerator()
+ {
+ Assert.IsFalse(_enumerated, "The collection {0} has already been enumerated", GetType());
+ _enumerated = true;
+ yield return _item;
+ }
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ { return GetEnumerator(); }
+ }
+
+ [Test]
+ public void DoesNotEnumerateTwiceForMessageList()
+ {
+ TestAllTypes.Builder b = new TestAllTypes.Builder();
+ b.AddRangeRepeatedForeignMessage(
+ new OneTimeEnumerator<ForeignMessage>(
+ ForeignMessage.DefaultInstance));
+ }
+ [Test]
+ public void DoesNotEnumerateTwiceForPrimitiveList()
+ {
+ TestAllTypes.Builder b = new TestAllTypes.Builder();
+ b.AddRangeRepeatedInt32(new OneTimeEnumerator<int>(1));
+ }
+ [Test]
+ public void DoesNotEnumerateTwiceForStringList()
+ {
+ TestAllTypes.Builder b = new TestAllTypes.Builder();
+ b.AddRangeRepeatedString(new OneTimeEnumerator<string>("test"));
+ }
+ [Test]
+ public void DoesNotEnumerateTwiceForEnumList()
+ {
+ TestAllTypes.Builder b = new TestAllTypes.Builder();
+ b.AddRangeRepeatedForeignEnum(new OneTimeEnumerator<ForeignEnum>(ForeignEnum.FOREIGN_BAR));
+ }
+
+ private static void AssertThrows<T>(System.Threading.ThreadStart method) where T : Exception
+ {
+ try
+ {
+ method();
+ }
+ catch (Exception error)
+ {
+ if (error is T)
+ return;
+ throw;
+ }
+ Assert.Fail("Expected exception of type " + typeof(T));
+ }
+
+ [Test]
+ public void DoesNotAddNullToMessageListByAddRange()
+ {
+ TestAllTypes.Builder b = new TestAllTypes.Builder();
+ AssertThrows<ArgumentNullException>(
+ () => b.AddRangeRepeatedForeignMessage(new ForeignMessage[] { null })
+ );
+ }
+ [Test]
+ public void DoesNotAddNullToMessageListByAdd()
+ {
+ TestAllTypes.Builder b = new TestAllTypes.Builder();
+ AssertThrows<ArgumentNullException>(
+ () => b.AddRepeatedForeignMessage((ForeignMessage)null)
+ );
+ }
+ [Test]
+ public void DoesNotAddNullToMessageListBySet()
+ {
+ TestAllTypes.Builder b = new TestAllTypes.Builder();
+ b.AddRepeatedForeignMessage(ForeignMessage.DefaultInstance);
+ AssertThrows<ArgumentNullException>(
+ () => b.SetRepeatedForeignMessage(0, (ForeignMessage)null)
+ );
+ }
+ [Test]
+ public void DoesNotAddNullToStringListByAddRange()
+ {
+ TestAllTypes.Builder b = new TestAllTypes.Builder();
+ AssertThrows<ArgumentNullException>(
+ () => b.AddRangeRepeatedString(new String[] { null })
+ );
+ }
+ [Test]
+ public void DoesNotAddNullToStringListByAdd()
+ {
+ TestAllTypes.Builder b = new TestAllTypes.Builder();
+ AssertThrows<ArgumentNullException>(
+ () => b.AddRepeatedString(null)
+ );
+ }
+ [Test]
+ public void DoesNotAddNullToStringListBySet()
+ {
+ TestAllTypes.Builder b = new TestAllTypes.Builder();
+ b.AddRepeatedString("one");
+ AssertThrows<ArgumentNullException>(
+ () => b.SetRepeatedString(0, null)
+ );
+ }
+ }
+}
diff --git a/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj b/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj index 95ab0b9c..f87546f8 100644 --- a/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj +++ b/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj @@ -97,6 +97,7 @@ <Compile Include="Descriptors\MessageDescriptorTest.cs" />
<Compile Include="DynamicMessageTest.cs" />
<Compile Include="ExtendableMessageTest.cs" />
+ <Compile Include="GeneratedBuilderTest.cs" />
<Compile Include="GeneratedMessageTest.cs" />
<Compile Include="MessageStreamIteratorTest.cs" />
<Compile Include="MessageStreamWriterTest.cs" />
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestEmbedOptimizeForProtoFile.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestEmbedOptimizeForProtoFile.cs index 09ecdd63..a15488c3 100644 --- a/src/ProtocolBuffers.Test/TestProtos/UnitTestEmbedOptimizeForProtoFile.cs +++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestEmbedOptimizeForProtoFile.cs @@ -246,7 +246,7 @@ namespace Google.ProtocolBuffers.TestProtos { MergeOptionalMessage(other.OptionalMessage);
}
if (other.repeatedMessage_.Count != 0) {
- base.AddRange(other.repeatedMessage_, result.repeatedMessage_);
+ result.repeatedMessage_.Add(other.repeatedMessage_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -379,7 +379,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> values) {
- base.AddRange(values, result.repeatedMessage_);
+ result.repeatedMessage_.Add(values);
return this;
}
public Builder ClearRepeatedMessage() {
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSizeProtoFile.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSizeProtoFile.cs index 77635f21..df2a9a53 100644 --- a/src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSizeProtoFile.cs +++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSizeProtoFile.cs @@ -877,7 +877,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeField5(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.field5_);
+ result.field5_.Add(values);
return this;
}
public Builder ClearField5() {
@@ -2515,7 +2515,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeField14(scg::IEnumerable<string> values) {
- base.AddRange(values, result.field14_);
+ result.field14_.Add(values);
return this;
}
public Builder ClearField14() {
@@ -2656,7 +2656,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeField22(scg::IEnumerable<string> values) {
- base.AddRange(values, result.field22_);
+ result.field22_.Add(values);
return this;
}
public Builder ClearField22() {
@@ -2682,7 +2682,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeField73(scg::IEnumerable<int> values) {
- base.AddRange(values, result.field73_);
+ result.field73_.Add(values);
return this;
}
public Builder ClearField73() {
@@ -3591,7 +3591,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeGroup1(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.SizeMessage2.Types.Group1> values) {
- base.AddRange(values, result.group1_);
+ result.group1_.Add(values);
return this;
}
public Builder ClearGroup1() {
@@ -3619,7 +3619,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeField128(scg::IEnumerable<string> values) {
- base.AddRange(values, result.field128_);
+ result.field128_.Add(values);
return this;
}
public Builder ClearField128() {
@@ -3665,7 +3665,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeField127(scg::IEnumerable<string> values) {
- base.AddRange(values, result.field127_);
+ result.field127_.Add(values);
return this;
}
public Builder ClearField127() {
@@ -3709,7 +3709,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeField130(scg::IEnumerable<long> values) {
- base.AddRange(values, result.field130_);
+ result.field130_.Add(values);
return this;
}
public Builder ClearField130() {
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSpeedProtoFile.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSpeedProtoFile.cs index 918be643..3305da40 100644 --- a/src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSpeedProtoFile.cs +++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSpeedProtoFile.cs @@ -975,7 +975,7 @@ namespace Google.ProtocolBuffers.TestProtos { Field4 = other.Field4;
}
if (other.field5_.Count != 0) {
- base.AddRange(other.field5_, result.field5_);
+ result.field5_.Add(other.field5_);
}
if (other.HasField59) {
Field59 = other.Field59;
@@ -1511,7 +1511,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeField5(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.field5_);
+ result.field5_.Add(values);
return this;
}
public Builder ClearField5() {
@@ -3569,7 +3569,7 @@ namespace Google.ProtocolBuffers.TestProtos { Field13 = other.Field13;
}
if (other.field14_.Count != 0) {
- base.AddRange(other.field14_, result.field14_);
+ result.field14_.Add(other.field14_);
}
if (other.HasField15) {
Field15 = other.Field15;
@@ -3590,10 +3590,10 @@ namespace Google.ProtocolBuffers.TestProtos { Field16 = other.Field16;
}
if (other.field22_.Count != 0) {
- base.AddRange(other.field22_, result.field22_);
+ result.field22_.Add(other.field22_);
}
if (other.field73_.Count != 0) {
- base.AddRange(other.field73_, result.field73_);
+ result.field73_.Add(other.field73_);
}
if (other.HasField20) {
Field20 = other.Field20;
@@ -3820,7 +3820,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeField14(scg::IEnumerable<string> values) {
- base.AddRange(values, result.field14_);
+ result.field14_.Add(values);
return this;
}
public Builder ClearField14() {
@@ -3961,7 +3961,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeField22(scg::IEnumerable<string> values) {
- base.AddRange(values, result.field22_);
+ result.field22_.Add(values);
return this;
}
public Builder ClearField22() {
@@ -3987,7 +3987,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeField73(scg::IEnumerable<int> values) {
- base.AddRange(values, result.field73_);
+ result.field73_.Add(values);
return this;
}
public Builder ClearField73() {
@@ -4764,22 +4764,22 @@ namespace Google.ProtocolBuffers.TestProtos { Field63 = other.Field63;
}
if (other.group1_.Count != 0) {
- base.AddRange(other.group1_, result.group1_);
+ result.group1_.Add(other.group1_);
}
if (other.field128_.Count != 0) {
- base.AddRange(other.field128_, result.field128_);
+ result.field128_.Add(other.field128_);
}
if (other.HasField131) {
Field131 = other.Field131;
}
if (other.field127_.Count != 0) {
- base.AddRange(other.field127_, result.field127_);
+ result.field127_.Add(other.field127_);
}
if (other.HasField129) {
Field129 = other.Field129;
}
if (other.field130_.Count != 0) {
- base.AddRange(other.field130_, result.field130_);
+ result.field130_.Add(other.field130_);
}
if (other.HasField205) {
Field205 = other.Field205;
@@ -5389,7 +5389,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeGroup1(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1> values) {
- base.AddRange(values, result.group1_);
+ result.group1_.Add(values);
return this;
}
public Builder ClearGroup1() {
@@ -5417,7 +5417,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeField128(scg::IEnumerable<string> values) {
- base.AddRange(values, result.field128_);
+ result.field128_.Add(values);
return this;
}
public Builder ClearField128() {
@@ -5463,7 +5463,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeField127(scg::IEnumerable<string> values) {
- base.AddRange(values, result.field127_);
+ result.field127_.Add(values);
return this;
}
public Builder ClearField127() {
@@ -5507,7 +5507,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeField130(scg::IEnumerable<long> values) {
- base.AddRange(values, result.field130_);
+ result.field130_.Add(values);
return this;
}
public Builder ClearField130() {
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestMessageSetProtoFile.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestMessageSetProtoFile.cs index 8a6bb589..34de1a98 100644 --- a/src/ProtocolBuffers.Test/TestProtos/UnitTestMessageSetProtoFile.cs +++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestMessageSetProtoFile.cs @@ -1499,7 +1499,7 @@ namespace Google.ProtocolBuffers.TestProtos { public override Builder MergeFrom(RawMessageSet other) {
if (other == global::Google.ProtocolBuffers.TestProtos.RawMessageSet.DefaultInstance) return this;
if (other.item_.Count != 0) {
- base.AddRange(other.item_, result.item_);
+ result.item_.Add(other.item_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -1587,7 +1587,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeItem(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item> values) {
- base.AddRange(values, result.item_);
+ result.item_.Add(values);
return this;
}
public Builder ClearItem() {
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestProtoFile.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestProtoFile.cs index d8824d49..49efaecd 100644 --- a/src/ProtocolBuffers.Test/TestProtos/UnitTestProtoFile.cs +++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestProtoFile.cs @@ -3333,76 +3333,76 @@ namespace Google.ProtocolBuffers.TestProtos { OptionalCord = other.OptionalCord;
}
if (other.repeatedInt32_.Count != 0) {
- base.AddRange(other.repeatedInt32_, result.repeatedInt32_);
+ result.repeatedInt32_.Add(other.repeatedInt32_);
}
if (other.repeatedInt64_.Count != 0) {
- base.AddRange(other.repeatedInt64_, result.repeatedInt64_);
+ result.repeatedInt64_.Add(other.repeatedInt64_);
}
if (other.repeatedUint32_.Count != 0) {
- base.AddRange(other.repeatedUint32_, result.repeatedUint32_);
+ result.repeatedUint32_.Add(other.repeatedUint32_);
}
if (other.repeatedUint64_.Count != 0) {
- base.AddRange(other.repeatedUint64_, result.repeatedUint64_);
+ result.repeatedUint64_.Add(other.repeatedUint64_);
}
if (other.repeatedSint32_.Count != 0) {
- base.AddRange(other.repeatedSint32_, result.repeatedSint32_);
+ result.repeatedSint32_.Add(other.repeatedSint32_);
}
if (other.repeatedSint64_.Count != 0) {
- base.AddRange(other.repeatedSint64_, result.repeatedSint64_);
+ result.repeatedSint64_.Add(other.repeatedSint64_);
}
if (other.repeatedFixed32_.Count != 0) {
- base.AddRange(other.repeatedFixed32_, result.repeatedFixed32_);
+ result.repeatedFixed32_.Add(other.repeatedFixed32_);
}
if (other.repeatedFixed64_.Count != 0) {
- base.AddRange(other.repeatedFixed64_, result.repeatedFixed64_);
+ result.repeatedFixed64_.Add(other.repeatedFixed64_);
}
if (other.repeatedSfixed32_.Count != 0) {
- base.AddRange(other.repeatedSfixed32_, result.repeatedSfixed32_);
+ result.repeatedSfixed32_.Add(other.repeatedSfixed32_);
}
if (other.repeatedSfixed64_.Count != 0) {
- base.AddRange(other.repeatedSfixed64_, result.repeatedSfixed64_);
+ result.repeatedSfixed64_.Add(other.repeatedSfixed64_);
}
if (other.repeatedFloat_.Count != 0) {
- base.AddRange(other.repeatedFloat_, result.repeatedFloat_);
+ result.repeatedFloat_.Add(other.repeatedFloat_);
}
if (other.repeatedDouble_.Count != 0) {
- base.AddRange(other.repeatedDouble_, result.repeatedDouble_);
+ result.repeatedDouble_.Add(other.repeatedDouble_);
}
if (other.repeatedBool_.Count != 0) {
- base.AddRange(other.repeatedBool_, result.repeatedBool_);
+ result.repeatedBool_.Add(other.repeatedBool_);
}
if (other.repeatedString_.Count != 0) {
- base.AddRange(other.repeatedString_, result.repeatedString_);
+ result.repeatedString_.Add(other.repeatedString_);
}
if (other.repeatedBytes_.Count != 0) {
- base.AddRange(other.repeatedBytes_, result.repeatedBytes_);
+ result.repeatedBytes_.Add(other.repeatedBytes_);
}
if (other.repeatedGroup_.Count != 0) {
- base.AddRange(other.repeatedGroup_, result.repeatedGroup_);
+ result.repeatedGroup_.Add(other.repeatedGroup_);
}
if (other.repeatedNestedMessage_.Count != 0) {
- base.AddRange(other.repeatedNestedMessage_, result.repeatedNestedMessage_);
+ result.repeatedNestedMessage_.Add(other.repeatedNestedMessage_);
}
if (other.repeatedForeignMessage_.Count != 0) {
- base.AddRange(other.repeatedForeignMessage_, result.repeatedForeignMessage_);
+ result.repeatedForeignMessage_.Add(other.repeatedForeignMessage_);
}
if (other.repeatedImportMessage_.Count != 0) {
- base.AddRange(other.repeatedImportMessage_, result.repeatedImportMessage_);
+ result.repeatedImportMessage_.Add(other.repeatedImportMessage_);
}
if (other.repeatedNestedEnum_.Count != 0) {
- base.AddRange(other.repeatedNestedEnum_, result.repeatedNestedEnum_);
+ result.repeatedNestedEnum_.Add(other.repeatedNestedEnum_);
}
if (other.repeatedForeignEnum_.Count != 0) {
- base.AddRange(other.repeatedForeignEnum_, result.repeatedForeignEnum_);
+ result.repeatedForeignEnum_.Add(other.repeatedForeignEnum_);
}
if (other.repeatedImportEnum_.Count != 0) {
- base.AddRange(other.repeatedImportEnum_, result.repeatedImportEnum_);
+ result.repeatedImportEnum_.Add(other.repeatedImportEnum_);
}
if (other.repeatedStringPiece_.Count != 0) {
- base.AddRange(other.repeatedStringPiece_, result.repeatedStringPiece_);
+ result.repeatedStringPiece_.Add(other.repeatedStringPiece_);
}
if (other.repeatedCord_.Count != 0) {
- base.AddRange(other.repeatedCord_, result.repeatedCord_);
+ result.repeatedCord_.Add(other.repeatedCord_);
}
if (other.HasDefaultInt32) {
DefaultInt32 = other.DefaultInt32;
@@ -4433,7 +4433,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedInt32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.repeatedInt32_);
+ result.repeatedInt32_.Add(values);
return this;
}
public Builder ClearRepeatedInt32() {
@@ -4459,7 +4459,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedInt64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.repeatedInt64_);
+ result.repeatedInt64_.Add(values);
return this;
}
public Builder ClearRepeatedInt64() {
@@ -4490,7 +4490,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedUint32(scg::IEnumerable<uint> values) {
- base.AddRange(values, result.repeatedUint32_);
+ result.repeatedUint32_.Add(values);
return this;
}
public Builder ClearRepeatedUint32() {
@@ -4521,7 +4521,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedUint64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.repeatedUint64_);
+ result.repeatedUint64_.Add(values);
return this;
}
public Builder ClearRepeatedUint64() {
@@ -4547,7 +4547,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedSint32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.repeatedSint32_);
+ result.repeatedSint32_.Add(values);
return this;
}
public Builder ClearRepeatedSint32() {
@@ -4573,7 +4573,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedSint64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.repeatedSint64_);
+ result.repeatedSint64_.Add(values);
return this;
}
public Builder ClearRepeatedSint64() {
@@ -4604,7 +4604,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedFixed32(scg::IEnumerable<uint> values) {
- base.AddRange(values, result.repeatedFixed32_);
+ result.repeatedFixed32_.Add(values);
return this;
}
public Builder ClearRepeatedFixed32() {
@@ -4635,7 +4635,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedFixed64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.repeatedFixed64_);
+ result.repeatedFixed64_.Add(values);
return this;
}
public Builder ClearRepeatedFixed64() {
@@ -4661,7 +4661,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedSfixed32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.repeatedSfixed32_);
+ result.repeatedSfixed32_.Add(values);
return this;
}
public Builder ClearRepeatedSfixed32() {
@@ -4687,7 +4687,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedSfixed64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.repeatedSfixed64_);
+ result.repeatedSfixed64_.Add(values);
return this;
}
public Builder ClearRepeatedSfixed64() {
@@ -4713,7 +4713,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedFloat(scg::IEnumerable<float> values) {
- base.AddRange(values, result.repeatedFloat_);
+ result.repeatedFloat_.Add(values);
return this;
}
public Builder ClearRepeatedFloat() {
@@ -4739,7 +4739,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedDouble(scg::IEnumerable<double> values) {
- base.AddRange(values, result.repeatedDouble_);
+ result.repeatedDouble_.Add(values);
return this;
}
public Builder ClearRepeatedDouble() {
@@ -4765,7 +4765,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedBool(scg::IEnumerable<bool> values) {
- base.AddRange(values, result.repeatedBool_);
+ result.repeatedBool_.Add(values);
return this;
}
public Builder ClearRepeatedBool() {
@@ -4793,7 +4793,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedString(scg::IEnumerable<string> values) {
- base.AddRange(values, result.repeatedString_);
+ result.repeatedString_.Add(values);
return this;
}
public Builder ClearRepeatedString() {
@@ -4821,7 +4821,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedBytes(scg::IEnumerable<pb::ByteString> values) {
- base.AddRange(values, result.repeatedBytes_);
+ result.repeatedBytes_.Add(values);
return this;
}
public Builder ClearRepeatedBytes() {
@@ -4859,7 +4859,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedGroup(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup> values) {
- base.AddRange(values, result.repeatedGroup_);
+ result.repeatedGroup_.Add(values);
return this;
}
public Builder ClearRepeatedGroup() {
@@ -4897,7 +4897,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedNestedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage> values) {
- base.AddRange(values, result.repeatedNestedMessage_);
+ result.repeatedNestedMessage_.Add(values);
return this;
}
public Builder ClearRepeatedNestedMessage() {
@@ -4935,7 +4935,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedForeignMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> values) {
- base.AddRange(values, result.repeatedForeignMessage_);
+ result.repeatedForeignMessage_.Add(values);
return this;
}
public Builder ClearRepeatedForeignMessage() {
@@ -4973,7 +4973,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedImportMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ImportMessage> values) {
- base.AddRange(values, result.repeatedImportMessage_);
+ result.repeatedImportMessage_.Add(values);
return this;
}
public Builder ClearRepeatedImportMessage() {
@@ -4999,7 +4999,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedNestedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum> values) {
- base.AddRange(values, result.repeatedNestedEnum_);
+ result.repeatedNestedEnum_.Add(values);
return this;
}
public Builder ClearRepeatedNestedEnum() {
@@ -5025,7 +5025,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedForeignEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
- base.AddRange(values, result.repeatedForeignEnum_);
+ result.repeatedForeignEnum_.Add(values);
return this;
}
public Builder ClearRepeatedForeignEnum() {
@@ -5051,7 +5051,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedImportEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ImportEnum> values) {
- base.AddRange(values, result.repeatedImportEnum_);
+ result.repeatedImportEnum_.Add(values);
return this;
}
public Builder ClearRepeatedImportEnum() {
@@ -5079,7 +5079,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedStringPiece(scg::IEnumerable<string> values) {
- base.AddRange(values, result.repeatedStringPiece_);
+ result.repeatedStringPiece_.Add(values);
return this;
}
public Builder ClearRepeatedStringPiece() {
@@ -5107,7 +5107,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedCord(scg::IEnumerable<string> values) {
- base.AddRange(values, result.repeatedCord_);
+ result.repeatedCord_.Add(values);
return this;
}
public Builder ClearRepeatedCord() {
@@ -8611,7 +8611,7 @@ namespace Google.ProtocolBuffers.TestProtos { MergeOptionalMessage(other.OptionalMessage);
}
if (other.repeatedMessage_.Count != 0) {
- base.AddRange(other.repeatedMessage_, result.repeatedMessage_);
+ result.repeatedMessage_.Add(other.repeatedMessage_);
}
if (other.HasDummy) {
Dummy = other.Dummy;
@@ -8751,7 +8751,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestRequired> values) {
- base.AddRange(values, result.repeatedMessage_);
+ result.repeatedMessage_.Add(values);
return this;
}
public Builder ClearRepeatedMessage() {
@@ -11868,10 +11868,10 @@ namespace Google.ProtocolBuffers.TestProtos { public override Builder MergeFrom(NestedMessage other) {
if (other == global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.DefaultInstance) return this;
if (other.nestedmessageRepeatedInt32_.Count != 0) {
- base.AddRange(other.nestedmessageRepeatedInt32_, result.nestedmessageRepeatedInt32_);
+ result.nestedmessageRepeatedInt32_.Add(other.nestedmessageRepeatedInt32_);
}
if (other.nestedmessageRepeatedForeignmessage_.Count != 0) {
- base.AddRange(other.nestedmessageRepeatedForeignmessage_, result.nestedmessageRepeatedForeignmessage_);
+ result.nestedmessageRepeatedForeignmessage_.Add(other.nestedmessageRepeatedForeignmessage_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -11952,7 +11952,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeNestedmessageRepeatedInt32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.nestedmessageRepeatedInt32_);
+ result.nestedmessageRepeatedInt32_.Add(values);
return this;
}
public Builder ClearNestedmessageRepeatedInt32() {
@@ -11990,7 +11990,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeNestedmessageRepeatedForeignmessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> values) {
- base.AddRange(values, result.nestedmessageRepeatedForeignmessage_);
+ result.nestedmessageRepeatedForeignmessage_.Add(values);
return this;
}
public Builder ClearNestedmessageRepeatedForeignmessage() {
@@ -12638,22 +12638,22 @@ namespace Google.ProtocolBuffers.TestProtos { CordField = other.CordField;
}
if (other.repeatedPrimitiveField_.Count != 0) {
- base.AddRange(other.repeatedPrimitiveField_, result.repeatedPrimitiveField_);
+ result.repeatedPrimitiveField_.Add(other.repeatedPrimitiveField_);
}
if (other.repeatedStringField_.Count != 0) {
- base.AddRange(other.repeatedStringField_, result.repeatedStringField_);
+ result.repeatedStringField_.Add(other.repeatedStringField_);
}
if (other.repeatedEnumField_.Count != 0) {
- base.AddRange(other.repeatedEnumField_, result.repeatedEnumField_);
+ result.repeatedEnumField_.Add(other.repeatedEnumField_);
}
if (other.repeatedMessageField_.Count != 0) {
- base.AddRange(other.repeatedMessageField_, result.repeatedMessageField_);
+ result.repeatedMessageField_.Add(other.repeatedMessageField_);
}
if (other.repeatedStringPieceField_.Count != 0) {
- base.AddRange(other.repeatedStringPieceField_, result.repeatedStringPieceField_);
+ result.repeatedStringPieceField_.Add(other.repeatedStringPieceField_);
}
if (other.repeatedCordField_.Count != 0) {
- base.AddRange(other.repeatedCordField_, result.repeatedCordField_);
+ result.repeatedCordField_.Add(other.repeatedCordField_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -12926,7 +12926,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedPrimitiveField(scg::IEnumerable<int> values) {
- base.AddRange(values, result.repeatedPrimitiveField_);
+ result.repeatedPrimitiveField_.Add(values);
return this;
}
public Builder ClearRepeatedPrimitiveField() {
@@ -12954,7 +12954,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedStringField(scg::IEnumerable<string> values) {
- base.AddRange(values, result.repeatedStringField_);
+ result.repeatedStringField_.Add(values);
return this;
}
public Builder ClearRepeatedStringField() {
@@ -12980,7 +12980,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedEnumField(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
- base.AddRange(values, result.repeatedEnumField_);
+ result.repeatedEnumField_.Add(values);
return this;
}
public Builder ClearRepeatedEnumField() {
@@ -13018,7 +13018,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedMessageField(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> values) {
- base.AddRange(values, result.repeatedMessageField_);
+ result.repeatedMessageField_.Add(values);
return this;
}
public Builder ClearRepeatedMessageField() {
@@ -13046,7 +13046,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedStringPieceField(scg::IEnumerable<string> values) {
- base.AddRange(values, result.repeatedStringPieceField_);
+ result.repeatedStringPieceField_.Add(values);
return this;
}
public Builder ClearRepeatedStringPieceField() {
@@ -13074,7 +13074,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedCordField(scg::IEnumerable<string> values) {
- base.AddRange(values, result.repeatedCordField_);
+ result.repeatedCordField_.Add(values);
return this;
}
public Builder ClearRepeatedCordField() {
@@ -15409,46 +15409,46 @@ namespace Google.ProtocolBuffers.TestProtos { public override Builder MergeFrom(TestPackedTypes other) {
if (other == global::Google.ProtocolBuffers.TestProtos.TestPackedTypes.DefaultInstance) return this;
if (other.packedInt32_.Count != 0) {
- base.AddRange(other.packedInt32_, result.packedInt32_);
+ result.packedInt32_.Add(other.packedInt32_);
}
if (other.packedInt64_.Count != 0) {
- base.AddRange(other.packedInt64_, result.packedInt64_);
+ result.packedInt64_.Add(other.packedInt64_);
}
if (other.packedUint32_.Count != 0) {
- base.AddRange(other.packedUint32_, result.packedUint32_);
+ result.packedUint32_.Add(other.packedUint32_);
}
if (other.packedUint64_.Count != 0) {
- base.AddRange(other.packedUint64_, result.packedUint64_);
+ result.packedUint64_.Add(other.packedUint64_);
}
if (other.packedSint32_.Count != 0) {
- base.AddRange(other.packedSint32_, result.packedSint32_);
+ result.packedSint32_.Add(other.packedSint32_);
}
if (other.packedSint64_.Count != 0) {
- base.AddRange(other.packedSint64_, result.packedSint64_);
+ result.packedSint64_.Add(other.packedSint64_);
}
if (other.packedFixed32_.Count != 0) {
- base.AddRange(other.packedFixed32_, result.packedFixed32_);
+ result.packedFixed32_.Add(other.packedFixed32_);
}
if (other.packedFixed64_.Count != 0) {
- base.AddRange(other.packedFixed64_, result.packedFixed64_);
+ result.packedFixed64_.Add(other.packedFixed64_);
}
if (other.packedSfixed32_.Count != 0) {
- base.AddRange(other.packedSfixed32_, result.packedSfixed32_);
+ result.packedSfixed32_.Add(other.packedSfixed32_);
}
if (other.packedSfixed64_.Count != 0) {
- base.AddRange(other.packedSfixed64_, result.packedSfixed64_);
+ result.packedSfixed64_.Add(other.packedSfixed64_);
}
if (other.packedFloat_.Count != 0) {
- base.AddRange(other.packedFloat_, result.packedFloat_);
+ result.packedFloat_.Add(other.packedFloat_);
}
if (other.packedDouble_.Count != 0) {
- base.AddRange(other.packedDouble_, result.packedDouble_);
+ result.packedDouble_.Add(other.packedDouble_);
}
if (other.packedBool_.Count != 0) {
- base.AddRange(other.packedBool_, result.packedBool_);
+ result.packedBool_.Add(other.packedBool_);
}
if (other.packedEnum_.Count != 0) {
- base.AddRange(other.packedEnum_, result.packedEnum_);
+ result.packedEnum_.Add(other.packedEnum_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -15599,7 +15599,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedInt32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.packedInt32_);
+ result.packedInt32_.Add(values);
return this;
}
public Builder ClearPackedInt32() {
@@ -15625,7 +15625,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedInt64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.packedInt64_);
+ result.packedInt64_.Add(values);
return this;
}
public Builder ClearPackedInt64() {
@@ -15656,7 +15656,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangePackedUint32(scg::IEnumerable<uint> values) {
- base.AddRange(values, result.packedUint32_);
+ result.packedUint32_.Add(values);
return this;
}
public Builder ClearPackedUint32() {
@@ -15687,7 +15687,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangePackedUint64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.packedUint64_);
+ result.packedUint64_.Add(values);
return this;
}
public Builder ClearPackedUint64() {
@@ -15713,7 +15713,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedSint32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.packedSint32_);
+ result.packedSint32_.Add(values);
return this;
}
public Builder ClearPackedSint32() {
@@ -15739,7 +15739,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedSint64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.packedSint64_);
+ result.packedSint64_.Add(values);
return this;
}
public Builder ClearPackedSint64() {
@@ -15770,7 +15770,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangePackedFixed32(scg::IEnumerable<uint> values) {
- base.AddRange(values, result.packedFixed32_);
+ result.packedFixed32_.Add(values);
return this;
}
public Builder ClearPackedFixed32() {
@@ -15801,7 +15801,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangePackedFixed64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.packedFixed64_);
+ result.packedFixed64_.Add(values);
return this;
}
public Builder ClearPackedFixed64() {
@@ -15827,7 +15827,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedSfixed32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.packedSfixed32_);
+ result.packedSfixed32_.Add(values);
return this;
}
public Builder ClearPackedSfixed32() {
@@ -15853,7 +15853,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedSfixed64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.packedSfixed64_);
+ result.packedSfixed64_.Add(values);
return this;
}
public Builder ClearPackedSfixed64() {
@@ -15879,7 +15879,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedFloat(scg::IEnumerable<float> values) {
- base.AddRange(values, result.packedFloat_);
+ result.packedFloat_.Add(values);
return this;
}
public Builder ClearPackedFloat() {
@@ -15905,7 +15905,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedDouble(scg::IEnumerable<double> values) {
- base.AddRange(values, result.packedDouble_);
+ result.packedDouble_.Add(values);
return this;
}
public Builder ClearPackedDouble() {
@@ -15931,7 +15931,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedBool(scg::IEnumerable<bool> values) {
- base.AddRange(values, result.packedBool_);
+ result.packedBool_.Add(values);
return this;
}
public Builder ClearPackedBool() {
@@ -15957,7 +15957,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
- base.AddRange(values, result.packedEnum_);
+ result.packedEnum_.Add(values);
return this;
}
public Builder ClearPackedEnum() {
@@ -16444,46 +16444,46 @@ namespace Google.ProtocolBuffers.TestProtos { public override Builder MergeFrom(TestUnpackedTypes other) {
if (other == global::Google.ProtocolBuffers.TestProtos.TestUnpackedTypes.DefaultInstance) return this;
if (other.unpackedInt32_.Count != 0) {
- base.AddRange(other.unpackedInt32_, result.unpackedInt32_);
+ result.unpackedInt32_.Add(other.unpackedInt32_);
}
if (other.unpackedInt64_.Count != 0) {
- base.AddRange(other.unpackedInt64_, result.unpackedInt64_);
+ result.unpackedInt64_.Add(other.unpackedInt64_);
}
if (other.unpackedUint32_.Count != 0) {
- base.AddRange(other.unpackedUint32_, result.unpackedUint32_);
+ result.unpackedUint32_.Add(other.unpackedUint32_);
}
if (other.unpackedUint64_.Count != 0) {
- base.AddRange(other.unpackedUint64_, result.unpackedUint64_);
+ result.unpackedUint64_.Add(other.unpackedUint64_);
}
if (other.unpackedSint32_.Count != 0) {
- base.AddRange(other.unpackedSint32_, result.unpackedSint32_);
+ result.unpackedSint32_.Add(other.unpackedSint32_);
}
if (other.unpackedSint64_.Count != 0) {
- base.AddRange(other.unpackedSint64_, result.unpackedSint64_);
+ result.unpackedSint64_.Add(other.unpackedSint64_);
}
if (other.unpackedFixed32_.Count != 0) {
- base.AddRange(other.unpackedFixed32_, result.unpackedFixed32_);
+ result.unpackedFixed32_.Add(other.unpackedFixed32_);
}
if (other.unpackedFixed64_.Count != 0) {
- base.AddRange(other.unpackedFixed64_, result.unpackedFixed64_);
+ result.unpackedFixed64_.Add(other.unpackedFixed64_);
}
if (other.unpackedSfixed32_.Count != 0) {
- base.AddRange(other.unpackedSfixed32_, result.unpackedSfixed32_);
+ result.unpackedSfixed32_.Add(other.unpackedSfixed32_);
}
if (other.unpackedSfixed64_.Count != 0) {
- base.AddRange(other.unpackedSfixed64_, result.unpackedSfixed64_);
+ result.unpackedSfixed64_.Add(other.unpackedSfixed64_);
}
if (other.unpackedFloat_.Count != 0) {
- base.AddRange(other.unpackedFloat_, result.unpackedFloat_);
+ result.unpackedFloat_.Add(other.unpackedFloat_);
}
if (other.unpackedDouble_.Count != 0) {
- base.AddRange(other.unpackedDouble_, result.unpackedDouble_);
+ result.unpackedDouble_.Add(other.unpackedDouble_);
}
if (other.unpackedBool_.Count != 0) {
- base.AddRange(other.unpackedBool_, result.unpackedBool_);
+ result.unpackedBool_.Add(other.unpackedBool_);
}
if (other.unpackedEnum_.Count != 0) {
- base.AddRange(other.unpackedEnum_, result.unpackedEnum_);
+ result.unpackedEnum_.Add(other.unpackedEnum_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -16634,7 +16634,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedInt32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.unpackedInt32_);
+ result.unpackedInt32_.Add(values);
return this;
}
public Builder ClearUnpackedInt32() {
@@ -16660,7 +16660,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedInt64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.unpackedInt64_);
+ result.unpackedInt64_.Add(values);
return this;
}
public Builder ClearUnpackedInt64() {
@@ -16691,7 +16691,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedUint32(scg::IEnumerable<uint> values) {
- base.AddRange(values, result.unpackedUint32_);
+ result.unpackedUint32_.Add(values);
return this;
}
public Builder ClearUnpackedUint32() {
@@ -16722,7 +16722,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedUint64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.unpackedUint64_);
+ result.unpackedUint64_.Add(values);
return this;
}
public Builder ClearUnpackedUint64() {
@@ -16748,7 +16748,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedSint32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.unpackedSint32_);
+ result.unpackedSint32_.Add(values);
return this;
}
public Builder ClearUnpackedSint32() {
@@ -16774,7 +16774,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedSint64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.unpackedSint64_);
+ result.unpackedSint64_.Add(values);
return this;
}
public Builder ClearUnpackedSint64() {
@@ -16805,7 +16805,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedFixed32(scg::IEnumerable<uint> values) {
- base.AddRange(values, result.unpackedFixed32_);
+ result.unpackedFixed32_.Add(values);
return this;
}
public Builder ClearUnpackedFixed32() {
@@ -16836,7 +16836,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedFixed64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.unpackedFixed64_);
+ result.unpackedFixed64_.Add(values);
return this;
}
public Builder ClearUnpackedFixed64() {
@@ -16862,7 +16862,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedSfixed32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.unpackedSfixed32_);
+ result.unpackedSfixed32_.Add(values);
return this;
}
public Builder ClearUnpackedSfixed32() {
@@ -16888,7 +16888,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedSfixed64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.unpackedSfixed64_);
+ result.unpackedSfixed64_.Add(values);
return this;
}
public Builder ClearUnpackedSfixed64() {
@@ -16914,7 +16914,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedFloat(scg::IEnumerable<float> values) {
- base.AddRange(values, result.unpackedFloat_);
+ result.unpackedFloat_.Add(values);
return this;
}
public Builder ClearUnpackedFloat() {
@@ -16940,7 +16940,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedDouble(scg::IEnumerable<double> values) {
- base.AddRange(values, result.unpackedDouble_);
+ result.unpackedDouble_.Add(values);
return this;
}
public Builder ClearUnpackedDouble() {
@@ -16966,7 +16966,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedBool(scg::IEnumerable<bool> values) {
- base.AddRange(values, result.unpackedBool_);
+ result.unpackedBool_.Add(values);
return this;
}
public Builder ClearUnpackedBool() {
@@ -16992,7 +16992,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
- base.AddRange(values, result.unpackedEnum_);
+ result.unpackedEnum_.Add(values);
return this;
}
public Builder ClearUnpackedEnum() {
@@ -17956,10 +17956,10 @@ namespace Google.ProtocolBuffers.TestProtos { MergeDynamicMessageExtension(other.DynamicMessageExtension);
}
if (other.repeatedExtension_.Count != 0) {
- base.AddRange(other.repeatedExtension_, result.repeatedExtension_);
+ result.repeatedExtension_.Add(other.repeatedExtension_);
}
if (other.packedExtension_.Count != 0) {
- base.AddRange(other.packedExtension_, result.packedExtension_);
+ result.packedExtension_.Add(other.packedExtension_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -18216,7 +18216,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedExtension(scg::IEnumerable<string> values) {
- base.AddRange(values, result.repeatedExtension_);
+ result.repeatedExtension_.Add(values);
return this;
}
public Builder ClearRepeatedExtension() {
@@ -18242,7 +18242,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedExtension(scg::IEnumerable<int> values) {
- base.AddRange(values, result.packedExtension_);
+ result.packedExtension_.Add(values);
return this;
}
public Builder ClearPackedExtension() {
@@ -18541,22 +18541,22 @@ namespace Google.ProtocolBuffers.TestProtos { public override Builder MergeFrom(TestRepeatedScalarDifferentTagSizes other) {
if (other == global::Google.ProtocolBuffers.TestProtos.TestRepeatedScalarDifferentTagSizes.DefaultInstance) return this;
if (other.repeatedFixed32_.Count != 0) {
- base.AddRange(other.repeatedFixed32_, result.repeatedFixed32_);
+ result.repeatedFixed32_.Add(other.repeatedFixed32_);
}
if (other.repeatedInt32_.Count != 0) {
- base.AddRange(other.repeatedInt32_, result.repeatedInt32_);
+ result.repeatedInt32_.Add(other.repeatedInt32_);
}
if (other.repeatedFixed64_.Count != 0) {
- base.AddRange(other.repeatedFixed64_, result.repeatedFixed64_);
+ result.repeatedFixed64_.Add(other.repeatedFixed64_);
}
if (other.repeatedInt64_.Count != 0) {
- base.AddRange(other.repeatedInt64_, result.repeatedInt64_);
+ result.repeatedInt64_.Add(other.repeatedInt64_);
}
if (other.repeatedFloat_.Count != 0) {
- base.AddRange(other.repeatedFloat_, result.repeatedFloat_);
+ result.repeatedFloat_.Add(other.repeatedFloat_);
}
if (other.repeatedUint64_.Count != 0) {
- base.AddRange(other.repeatedUint64_, result.repeatedUint64_);
+ result.repeatedUint64_.Add(other.repeatedUint64_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -18663,7 +18663,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedFixed32(scg::IEnumerable<uint> values) {
- base.AddRange(values, result.repeatedFixed32_);
+ result.repeatedFixed32_.Add(values);
return this;
}
public Builder ClearRepeatedFixed32() {
@@ -18689,7 +18689,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedInt32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.repeatedInt32_);
+ result.repeatedInt32_.Add(values);
return this;
}
public Builder ClearRepeatedInt32() {
@@ -18720,7 +18720,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedFixed64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.repeatedFixed64_);
+ result.repeatedFixed64_.Add(values);
return this;
}
public Builder ClearRepeatedFixed64() {
@@ -18746,7 +18746,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedInt64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.repeatedInt64_);
+ result.repeatedInt64_.Add(values);
return this;
}
public Builder ClearRepeatedInt64() {
@@ -18772,7 +18772,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedFloat(scg::IEnumerable<float> values) {
- base.AddRange(values, result.repeatedFloat_);
+ result.repeatedFloat_.Add(values);
return this;
}
public Builder ClearRepeatedFloat() {
@@ -18803,7 +18803,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedUint64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.repeatedUint64_);
+ result.repeatedUint64_.Add(values);
return this;
}
public Builder ClearRepeatedUint64() {
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestRpcInterop.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestRpcInterop.cs index ae309fa7..9863025f 100644 --- a/src/ProtocolBuffers.Test/TestProtos/UnitTestRpcInterop.cs +++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestRpcInterop.cs @@ -245,7 +245,7 @@ namespace Google.ProtocolBuffers.TestProtos { public override Builder MergeFrom(SearchRequest other) {
if (other == global::Google.ProtocolBuffers.TestProtos.SearchRequest.DefaultInstance) return this;
if (other.criteria_.Count != 0) {
- base.AddRange(other.criteria_, result.criteria_);
+ result.criteria_.Add(other.criteria_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -323,7 +323,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeCriteria(scg::IEnumerable<string> values) {
- base.AddRange(values, result.criteria_);
+ result.criteria_.Add(values);
return this;
}
public Builder ClearCriteria() {
@@ -791,7 +791,7 @@ namespace Google.ProtocolBuffers.TestProtos { public override Builder MergeFrom(SearchResponse other) {
if (other == global::Google.ProtocolBuffers.TestProtos.SearchResponse.DefaultInstance) return this;
if (other.results_.Count != 0) {
- base.AddRange(other.results_, result.results_);
+ result.results_.Add(other.results_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -879,7 +879,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeResults(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem> values) {
- base.AddRange(values, result.results_);
+ result.results_.Add(values);
return this;
}
public Builder ClearResults() {
@@ -1076,7 +1076,7 @@ namespace Google.ProtocolBuffers.TestProtos { public override Builder MergeFrom(RefineSearchRequest other) {
if (other == global::Google.ProtocolBuffers.TestProtos.RefineSearchRequest.DefaultInstance) return this;
if (other.criteria_.Count != 0) {
- base.AddRange(other.criteria_, result.criteria_);
+ result.criteria_.Add(other.criteria_);
}
if (other.HasPreviousResults) {
MergePreviousResults(other.PreviousResults);
@@ -1166,7 +1166,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeCriteria(scg::IEnumerable<string> values) {
- base.AddRange(values, result.criteria_);
+ result.criteria_.Add(values);
return this;
}
public Builder ClearCriteria() {
diff --git a/src/ProtocolBuffers.Test/TestProtos/UnitTestXmlSerializerTestProtoFile.cs b/src/ProtocolBuffers.Test/TestProtos/UnitTestXmlSerializerTestProtoFile.cs index 3d818a60..3221ba1c 100644 --- a/src/ProtocolBuffers.Test/TestProtos/UnitTestXmlSerializerTestProtoFile.cs +++ b/src/ProtocolBuffers.Test/TestProtos/UnitTestXmlSerializerTestProtoFile.cs @@ -318,7 +318,7 @@ namespace Google.ProtocolBuffers.TestProtos { public override Builder MergeFrom(TestXmlChild other) {
if (other == global::Google.ProtocolBuffers.TestProtos.TestXmlChild.DefaultInstance) return this;
if (other.options_.Count != 0) {
- base.AddRange(other.options_, result.options_);
+ result.options_.Add(other.options_);
}
if (other.HasBinary) {
Binary = other.Binary;
@@ -411,7 +411,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeOptions(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.EnumOptions> values) {
- base.AddRange(values, result.options_);
+ result.options_.Add(values);
return this;
}
public Builder ClearOptions() {
@@ -1119,7 +1119,7 @@ namespace Google.ProtocolBuffers.TestProtos { public override Builder MergeFrom(Children other) {
if (other == global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children.DefaultInstance) return this;
if (other.options_.Count != 0) {
- base.AddRange(other.options_, result.options_);
+ result.options_.Add(other.options_);
}
if (other.HasBinary) {
Binary = other.Binary;
@@ -1212,7 +1212,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeOptions(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.EnumOptions> values) {
- base.AddRange(values, result.options_);
+ result.options_.Add(values);
return this;
}
public Builder ClearOptions() {
@@ -1500,13 +1500,13 @@ namespace Google.ProtocolBuffers.TestProtos { Number = other.Number;
}
if (other.numbers_.Count != 0) {
- base.AddRange(other.numbers_, result.numbers_);
+ result.numbers_.Add(other.numbers_);
}
if (other.HasText) {
Text = other.Text;
}
if (other.textlines_.Count != 0) {
- base.AddRange(other.textlines_, result.textlines_);
+ result.textlines_.Add(other.textlines_);
}
if (other.HasValid) {
Valid = other.Valid;
@@ -1515,7 +1515,7 @@ namespace Google.ProtocolBuffers.TestProtos { MergeChild(other.Child);
}
if (other.children_.Count != 0) {
- base.AddRange(other.children_, result.children_);
+ result.children_.Add(other.children_);
}
this.MergeExtensionFields(other);
this.MergeUnknownFields(other.UnknownFields);
@@ -1640,7 +1640,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeNumbers(scg::IEnumerable<int> values) {
- base.AddRange(values, result.numbers_);
+ result.numbers_.Add(values);
return this;
}
public Builder ClearNumbers() {
@@ -1687,7 +1687,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeTextlines(scg::IEnumerable<string> values) {
- base.AddRange(values, result.textlines_);
+ result.textlines_.Add(values);
return this;
}
public Builder ClearTextlines() {
@@ -1779,7 +1779,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeChildren(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children> values) {
- base.AddRange(values, result.children_);
+ result.children_.Add(values);
return this;
}
public Builder ClearChildren() {
diff --git a/src/ProtocolBuffers/Collections/PopsicleList.cs b/src/ProtocolBuffers/Collections/PopsicleList.cs index dc5c5836..3de97f89 100644 --- a/src/ProtocolBuffers/Collections/PopsicleList.cs +++ b/src/ProtocolBuffers/Collections/PopsicleList.cs @@ -42,6 +42,7 @@ namespace Google.ProtocolBuffers.Collections /// </summary>
public sealed class PopsicleList<T> : IPopsicleList<T>, ICastArray
{
+ private static readonly bool CheckForNull = default(T) == null;
private static readonly T[] EmptySet = new T[0];
private List<T> items;
@@ -65,6 +66,10 @@ namespace Google.ProtocolBuffers.Collections public void Insert(int index, T item)
{
ValidateModification();
+ if (CheckForNull)
+ {
+ ThrowHelper.ThrowIfNull(item);
+ }
items.Insert(index, item);
}
@@ -87,6 +92,10 @@ namespace Google.ProtocolBuffers.Collections set
{
ValidateModification();
+ if (CheckForNull)
+ {
+ ThrowHelper.ThrowIfNull(value);
+ }
items[index] = value;
}
}
@@ -94,6 +103,10 @@ namespace Google.ProtocolBuffers.Collections public void Add(T item)
{
ValidateModification();
+ if (CheckForNull)
+ {
+ ThrowHelper.ThrowIfNull(item);
+ }
items.Add(item);
}
@@ -145,15 +158,30 @@ namespace Google.ProtocolBuffers.Collections public void Add(IEnumerable<T> collection)
{
- if (readOnly)
+ ValidateModification();
+ ThrowHelper.ThrowIfNull(collection);
+
+ if (!CheckForNull || collection is PopsicleList<T>)
{
- throw new NotSupportedException("List is read-only");
+ items.AddRange(collection);
}
- if (items == null)
+ else
{
- items = new List<T>();
+ // Assumption, it's ok to enumerate collections more than once.
+ if (collection is ICollection<T>)
+ {
+ ThrowHelper.ThrowIfAnyNull(collection);
+ items.AddRange(collection);
+ }
+ else
+ {
+ foreach (T item in collection)
+ {
+ ThrowHelper.ThrowIfNull(item);
+ items.Add(item);
+ }
+ }
}
- items.AddRange(collection);
}
private void ValidateModification()
diff --git a/src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs b/src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs index 5b48cde1..326df8b7 100644 --- a/src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs +++ b/src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs @@ -393,7 +393,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { public override Builder MergeFrom(FileDescriptorSet other) {
if (other == global::Google.ProtocolBuffers.DescriptorProtos.FileDescriptorSet.DefaultInstance) return this;
if (other.file_.Count != 0) {
- base.AddRange(other.file_, result.file_);
+ result.file_.Add(other.file_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -481,7 +481,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeFile(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.FileDescriptorProto> values) {
- base.AddRange(values, result.file_);
+ result.file_.Add(values);
return this;
}
public Builder ClearFile() {
@@ -805,19 +805,19 @@ namespace Google.ProtocolBuffers.DescriptorProtos { Package = other.Package;
}
if (other.dependency_.Count != 0) {
- base.AddRange(other.dependency_, result.dependency_);
+ result.dependency_.Add(other.dependency_);
}
if (other.messageType_.Count != 0) {
- base.AddRange(other.messageType_, result.messageType_);
+ result.messageType_.Add(other.messageType_);
}
if (other.enumType_.Count != 0) {
- base.AddRange(other.enumType_, result.enumType_);
+ result.enumType_.Add(other.enumType_);
}
if (other.service_.Count != 0) {
- base.AddRange(other.service_, result.service_);
+ result.service_.Add(other.service_);
}
if (other.extension_.Count != 0) {
- base.AddRange(other.extension_, result.extension_);
+ result.extension_.Add(other.extension_);
}
if (other.HasOptions) {
MergeOptions(other.Options);
@@ -969,7 +969,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeDependency(scg::IEnumerable<string> values) {
- base.AddRange(values, result.dependency_);
+ result.dependency_.Add(values);
return this;
}
public Builder ClearDependency() {
@@ -1007,7 +1007,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeMessageType(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto> values) {
- base.AddRange(values, result.messageType_);
+ result.messageType_.Add(values);
return this;
}
public Builder ClearMessageType() {
@@ -1045,7 +1045,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeEnumType(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.EnumDescriptorProto> values) {
- base.AddRange(values, result.enumType_);
+ result.enumType_.Add(values);
return this;
}
public Builder ClearEnumType() {
@@ -1083,7 +1083,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeService(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.ServiceDescriptorProto> values) {
- base.AddRange(values, result.service_);
+ result.service_.Add(values);
return this;
}
public Builder ClearService() {
@@ -1121,7 +1121,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeExtension(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.FieldDescriptorProto> values) {
- base.AddRange(values, result.extension_);
+ result.extension_.Add(values);
return this;
}
public Builder ClearExtension() {
@@ -1745,19 +1745,19 @@ namespace Google.ProtocolBuffers.DescriptorProtos { Name = other.Name;
}
if (other.field_.Count != 0) {
- base.AddRange(other.field_, result.field_);
+ result.field_.Add(other.field_);
}
if (other.extension_.Count != 0) {
- base.AddRange(other.extension_, result.extension_);
+ result.extension_.Add(other.extension_);
}
if (other.nestedType_.Count != 0) {
- base.AddRange(other.nestedType_, result.nestedType_);
+ result.nestedType_.Add(other.nestedType_);
}
if (other.enumType_.Count != 0) {
- base.AddRange(other.enumType_, result.enumType_);
+ result.enumType_.Add(other.enumType_);
}
if (other.extensionRange_.Count != 0) {
- base.AddRange(other.extensionRange_, result.extensionRange_);
+ result.extensionRange_.Add(other.extensionRange_);
}
if (other.HasOptions) {
MergeOptions(other.Options);
@@ -1896,7 +1896,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeField(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.FieldDescriptorProto> values) {
- base.AddRange(values, result.field_);
+ result.field_.Add(values);
return this;
}
public Builder ClearField() {
@@ -1934,7 +1934,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeExtension(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.FieldDescriptorProto> values) {
- base.AddRange(values, result.extension_);
+ result.extension_.Add(values);
return this;
}
public Builder ClearExtension() {
@@ -1972,7 +1972,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeNestedType(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto> values) {
- base.AddRange(values, result.nestedType_);
+ result.nestedType_.Add(values);
return this;
}
public Builder ClearNestedType() {
@@ -2010,7 +2010,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeEnumType(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.EnumDescriptorProto> values) {
- base.AddRange(values, result.enumType_);
+ result.enumType_.Add(values);
return this;
}
public Builder ClearEnumType() {
@@ -2048,7 +2048,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeExtensionRange(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ExtensionRange> values) {
- base.AddRange(values, result.extensionRange_);
+ result.extensionRange_.Add(values);
return this;
}
public Builder ClearExtensionRange() {
@@ -2910,7 +2910,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { Name = other.Name;
}
if (other.value_.Count != 0) {
- base.AddRange(other.value_, result.value_);
+ result.value_.Add(other.value_);
}
if (other.HasOptions) {
MergeOptions(other.Options);
@@ -3033,7 +3033,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeValue(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.EnumValueDescriptorProto> values) {
- base.AddRange(values, result.value_);
+ result.value_.Add(values);
return this;
}
public Builder ClearValue() {
@@ -3632,7 +3632,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { Name = other.Name;
}
if (other.method_.Count != 0) {
- base.AddRange(other.method_, result.method_);
+ result.method_.Add(other.method_);
}
if (other.HasOptions) {
MergeOptions(other.Options);
@@ -3755,7 +3755,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeMethod(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.MethodDescriptorProto> values) {
- base.AddRange(values, result.method_);
+ result.method_.Add(values);
return this;
}
public Builder ClearMethod() {
@@ -4512,7 +4512,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { PyGenericServices = other.PyGenericServices;
}
if (other.uninterpretedOption_.Count != 0) {
- base.AddRange(other.uninterpretedOption_, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(other.uninterpretedOption_);
}
this.MergeExtensionFields(other);
this.MergeUnknownFields(other.UnknownFields);
@@ -4765,7 +4765,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeUninterpretedOption(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption> values) {
- base.AddRange(values, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(values);
return this;
}
public Builder ClearUninterpretedOption() {
@@ -4984,7 +4984,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { NoStandardDescriptorAccessor = other.NoStandardDescriptorAccessor;
}
if (other.uninterpretedOption_.Count != 0) {
- base.AddRange(other.uninterpretedOption_, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(other.uninterpretedOption_);
}
this.MergeExtensionFields(other);
this.MergeUnknownFields(other.UnknownFields);
@@ -5117,7 +5117,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeUninterpretedOption(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption> values) {
- base.AddRange(values, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(values);
return this;
}
public Builder ClearUninterpretedOption() {
@@ -5390,7 +5390,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { ExperimentalMapKey = other.ExperimentalMapKey;
}
if (other.uninterpretedOption_.Count != 0) {
- base.AddRange(other.uninterpretedOption_, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(other.uninterpretedOption_);
}
this.MergeExtensionFields(other);
this.MergeUnknownFields(other.UnknownFields);
@@ -5576,7 +5576,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeUninterpretedOption(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption> values) {
- base.AddRange(values, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(values);
return this;
}
public Builder ClearUninterpretedOption() {
@@ -5757,7 +5757,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { public override Builder MergeFrom(EnumOptions other) {
if (other == global::Google.ProtocolBuffers.DescriptorProtos.EnumOptions.DefaultInstance) return this;
if (other.uninterpretedOption_.Count != 0) {
- base.AddRange(other.uninterpretedOption_, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(other.uninterpretedOption_);
}
this.MergeExtensionFields(other);
this.MergeUnknownFields(other.UnknownFields);
@@ -5846,7 +5846,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeUninterpretedOption(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption> values) {
- base.AddRange(values, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(values);
return this;
}
public Builder ClearUninterpretedOption() {
@@ -6027,7 +6027,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { public override Builder MergeFrom(EnumValueOptions other) {
if (other == global::Google.ProtocolBuffers.DescriptorProtos.EnumValueOptions.DefaultInstance) return this;
if (other.uninterpretedOption_.Count != 0) {
- base.AddRange(other.uninterpretedOption_, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(other.uninterpretedOption_);
}
this.MergeExtensionFields(other);
this.MergeUnknownFields(other.UnknownFields);
@@ -6116,7 +6116,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeUninterpretedOption(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption> values) {
- base.AddRange(values, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(values);
return this;
}
public Builder ClearUninterpretedOption() {
@@ -6297,7 +6297,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { public override Builder MergeFrom(ServiceOptions other) {
if (other == global::Google.ProtocolBuffers.DescriptorProtos.ServiceOptions.DefaultInstance) return this;
if (other.uninterpretedOption_.Count != 0) {
- base.AddRange(other.uninterpretedOption_, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(other.uninterpretedOption_);
}
this.MergeExtensionFields(other);
this.MergeUnknownFields(other.UnknownFields);
@@ -6386,7 +6386,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeUninterpretedOption(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption> values) {
- base.AddRange(values, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(values);
return this;
}
public Builder ClearUninterpretedOption() {
@@ -6567,7 +6567,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { public override Builder MergeFrom(MethodOptions other) {
if (other == global::Google.ProtocolBuffers.DescriptorProtos.MethodOptions.DefaultInstance) return this;
if (other.uninterpretedOption_.Count != 0) {
- base.AddRange(other.uninterpretedOption_, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(other.uninterpretedOption_);
}
this.MergeExtensionFields(other);
this.MergeUnknownFields(other.UnknownFields);
@@ -6656,7 +6656,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeUninterpretedOption(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption> values) {
- base.AddRange(values, result.uninterpretedOption_);
+ result.uninterpretedOption_.Add(values);
return this;
}
public Builder ClearUninterpretedOption() {
@@ -7205,7 +7205,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { public override Builder MergeFrom(UninterpretedOption other) {
if (other == global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption.DefaultInstance) return this;
if (other.name_.Count != 0) {
- base.AddRange(other.name_, result.name_);
+ result.name_.Add(other.name_);
}
if (other.HasIdentifierValue) {
IdentifierValue = other.IdentifierValue;
@@ -7328,7 +7328,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos { return this;
}
public Builder AddRangeName(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption.Types.NamePart> values) {
- base.AddRange(values, result.name_);
+ result.name_.Add(values);
return this;
}
public Builder ClearName() {
diff --git a/src/ProtocolBuffers/GeneratedBuilder.cs b/src/ProtocolBuffers/GeneratedBuilder.cs index 94948e49..0dacce1e 100644 --- a/src/ProtocolBuffers/GeneratedBuilder.cs +++ b/src/ProtocolBuffers/GeneratedBuilder.cs @@ -85,32 +85,6 @@ namespace Google.ProtocolBuffers }
/// <summary>
- /// Adds all of the specified values to the given collection.
- /// </summary>
- /// <exception cref="ArgumentNullException">Any element of the list is null</exception>
- protected void AddRange<T>(IEnumerable<T> source, IList<T> destination)
- {
- ThrowHelper.ThrowIfNull(source);
- // We only need to check this for nullable types.
- if (default(T) == null)
- {
- ThrowHelper.ThrowIfAnyNull(source);
- }
- List<T> list = destination as List<T>;
- if (list != null)
- {
- list.AddRange(source);
- }
- else
- {
- foreach (T element in source)
- {
- destination.Add(element);
- }
- }
- }
-
- /// <summary>
/// Called by derived classes to parse an unknown field.
/// </summary>
/// <returns>true unless the tag is an end-group tag</returns>
diff --git a/src/ProtocolBuffers/GeneratedBuilderLite.cs b/src/ProtocolBuffers/GeneratedBuilderLite.cs index cd2b8395..168f596a 100644 --- a/src/ProtocolBuffers/GeneratedBuilderLite.cs +++ b/src/ProtocolBuffers/GeneratedBuilderLite.cs @@ -67,32 +67,6 @@ namespace Google.ProtocolBuffers }
/// <summary>
- /// Adds all of the specified values to the given collection.
- /// </summary>
- /// <exception cref="ArgumentNullException">Any element of the list is null</exception>
- protected void AddRange<T>(IEnumerable<T> source, IList<T> destination)
- {
- ThrowHelper.ThrowIfNull(source);
- // We only need to check this for nullable types.
- if (default(T) == null)
- {
- ThrowHelper.ThrowIfAnyNull(source);
- }
- List<T> list = destination as List<T>;
- if (list != null)
- {
- list.AddRange(source);
- }
- else
- {
- foreach (T element in source)
- {
- destination.Add(element);
- }
- }
- }
-
- /// <summary>
/// Called by derived classes to parse an unknown field.
/// </summary>
/// <returns>true unless the tag is an end-group tag</returns>
diff --git a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasFullProtoFile.cs b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasFullProtoFile.cs index a9ee7772..64d754d6 100644 --- a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasFullProtoFile.cs +++ b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasFullProtoFile.cs @@ -809,7 +809,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeCodes(scg::IEnumerable<int> values) {
- base.AddRange(values, result.codes_);
+ result.codes_.Add(values);
return this;
}
public Builder ClearCodes() {
@@ -847,7 +847,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePhone(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestInteropPerson.Types.PhoneNumber> values) {
- base.AddRange(values, result.phone_);
+ result.phone_.Add(values);
return this;
}
public Builder ClearPhone() {
@@ -885,7 +885,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeAddresses(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestInteropPerson.Types.Addresses> values) {
- base.AddRange(values, result.addresses_);
+ result.addresses_.Add(values);
return this;
}
public Builder ClearAddresses() {
@@ -1231,7 +1231,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeValues(scg::IEnumerable<string> values) {
- base.AddRange(values, result.values_);
+ result.values_.Add(values);
return this;
}
public Builder ClearValues() {
@@ -1630,7 +1630,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeValues(scg::IEnumerable<string> values) {
- base.AddRange(values, result.values_);
+ result.values_.Add(values);
return this;
}
public Builder ClearValues() {
diff --git a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasLiteProtoFile.cs b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasLiteProtoFile.cs index bc214e25..38d6ff8b 100644 --- a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasLiteProtoFile.cs +++ b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasLiteProtoFile.cs @@ -1354,13 +1354,13 @@ namespace Google.ProtocolBuffers.TestProtos { Email = other.Email;
}
if (other.codes_.Count != 0) {
- base.AddRange(other.codes_, result.codes_);
+ result.codes_.Add(other.codes_);
}
if (other.phone_.Count != 0) {
- base.AddRange(other.phone_, result.phone_);
+ result.phone_.Add(other.phone_);
}
if (other.addresses_.Count != 0) {
- base.AddRange(other.addresses_, result.addresses_);
+ result.addresses_.Add(other.addresses_);
}
this.MergeExtensionFields(other);
return this;
@@ -1500,7 +1500,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeCodes(scg::IEnumerable<int> values) {
- base.AddRange(values, result.codes_);
+ result.codes_.Add(values);
return this;
}
public Builder ClearCodes() {
@@ -1538,7 +1538,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePhone(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestInteropPersonLite.Types.PhoneNumber> values) {
- base.AddRange(values, result.phone_);
+ result.phone_.Add(values);
return this;
}
public Builder ClearPhone() {
@@ -1576,7 +1576,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeAddresses(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestInteropPersonLite.Types.Addresses> values) {
- base.AddRange(values, result.addresses_);
+ result.addresses_.Add(values);
return this;
}
public Builder ClearAddresses() {
diff --git a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteProtoFile.cs b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteProtoFile.cs index 78bed7e2..6b4e90e8 100644 --- a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteProtoFile.cs +++ b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteProtoFile.cs @@ -3690,76 +3690,76 @@ namespace Google.ProtocolBuffers.TestProtos { OptionalCord = other.OptionalCord;
}
if (other.repeatedInt32_.Count != 0) {
- base.AddRange(other.repeatedInt32_, result.repeatedInt32_);
+ result.repeatedInt32_.Add(other.repeatedInt32_);
}
if (other.repeatedInt64_.Count != 0) {
- base.AddRange(other.repeatedInt64_, result.repeatedInt64_);
+ result.repeatedInt64_.Add(other.repeatedInt64_);
}
if (other.repeatedUint32_.Count != 0) {
- base.AddRange(other.repeatedUint32_, result.repeatedUint32_);
+ result.repeatedUint32_.Add(other.repeatedUint32_);
}
if (other.repeatedUint64_.Count != 0) {
- base.AddRange(other.repeatedUint64_, result.repeatedUint64_);
+ result.repeatedUint64_.Add(other.repeatedUint64_);
}
if (other.repeatedSint32_.Count != 0) {
- base.AddRange(other.repeatedSint32_, result.repeatedSint32_);
+ result.repeatedSint32_.Add(other.repeatedSint32_);
}
if (other.repeatedSint64_.Count != 0) {
- base.AddRange(other.repeatedSint64_, result.repeatedSint64_);
+ result.repeatedSint64_.Add(other.repeatedSint64_);
}
if (other.repeatedFixed32_.Count != 0) {
- base.AddRange(other.repeatedFixed32_, result.repeatedFixed32_);
+ result.repeatedFixed32_.Add(other.repeatedFixed32_);
}
if (other.repeatedFixed64_.Count != 0) {
- base.AddRange(other.repeatedFixed64_, result.repeatedFixed64_);
+ result.repeatedFixed64_.Add(other.repeatedFixed64_);
}
if (other.repeatedSfixed32_.Count != 0) {
- base.AddRange(other.repeatedSfixed32_, result.repeatedSfixed32_);
+ result.repeatedSfixed32_.Add(other.repeatedSfixed32_);
}
if (other.repeatedSfixed64_.Count != 0) {
- base.AddRange(other.repeatedSfixed64_, result.repeatedSfixed64_);
+ result.repeatedSfixed64_.Add(other.repeatedSfixed64_);
}
if (other.repeatedFloat_.Count != 0) {
- base.AddRange(other.repeatedFloat_, result.repeatedFloat_);
+ result.repeatedFloat_.Add(other.repeatedFloat_);
}
if (other.repeatedDouble_.Count != 0) {
- base.AddRange(other.repeatedDouble_, result.repeatedDouble_);
+ result.repeatedDouble_.Add(other.repeatedDouble_);
}
if (other.repeatedBool_.Count != 0) {
- base.AddRange(other.repeatedBool_, result.repeatedBool_);
+ result.repeatedBool_.Add(other.repeatedBool_);
}
if (other.repeatedString_.Count != 0) {
- base.AddRange(other.repeatedString_, result.repeatedString_);
+ result.repeatedString_.Add(other.repeatedString_);
}
if (other.repeatedBytes_.Count != 0) {
- base.AddRange(other.repeatedBytes_, result.repeatedBytes_);
+ result.repeatedBytes_.Add(other.repeatedBytes_);
}
if (other.repeatedGroup_.Count != 0) {
- base.AddRange(other.repeatedGroup_, result.repeatedGroup_);
+ result.repeatedGroup_.Add(other.repeatedGroup_);
}
if (other.repeatedNestedMessage_.Count != 0) {
- base.AddRange(other.repeatedNestedMessage_, result.repeatedNestedMessage_);
+ result.repeatedNestedMessage_.Add(other.repeatedNestedMessage_);
}
if (other.repeatedForeignMessage_.Count != 0) {
- base.AddRange(other.repeatedForeignMessage_, result.repeatedForeignMessage_);
+ result.repeatedForeignMessage_.Add(other.repeatedForeignMessage_);
}
if (other.repeatedImportMessage_.Count != 0) {
- base.AddRange(other.repeatedImportMessage_, result.repeatedImportMessage_);
+ result.repeatedImportMessage_.Add(other.repeatedImportMessage_);
}
if (other.repeatedNestedEnum_.Count != 0) {
- base.AddRange(other.repeatedNestedEnum_, result.repeatedNestedEnum_);
+ result.repeatedNestedEnum_.Add(other.repeatedNestedEnum_);
}
if (other.repeatedForeignEnum_.Count != 0) {
- base.AddRange(other.repeatedForeignEnum_, result.repeatedForeignEnum_);
+ result.repeatedForeignEnum_.Add(other.repeatedForeignEnum_);
}
if (other.repeatedImportEnum_.Count != 0) {
- base.AddRange(other.repeatedImportEnum_, result.repeatedImportEnum_);
+ result.repeatedImportEnum_.Add(other.repeatedImportEnum_);
}
if (other.repeatedStringPiece_.Count != 0) {
- base.AddRange(other.repeatedStringPiece_, result.repeatedStringPiece_);
+ result.repeatedStringPiece_.Add(other.repeatedStringPiece_);
}
if (other.repeatedCord_.Count != 0) {
- base.AddRange(other.repeatedCord_, result.repeatedCord_);
+ result.repeatedCord_.Add(other.repeatedCord_);
}
if (other.HasDefaultInt32) {
DefaultInt32 = other.DefaultInt32;
@@ -4728,7 +4728,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedInt32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.repeatedInt32_);
+ result.repeatedInt32_.Add(values);
return this;
}
public Builder ClearRepeatedInt32() {
@@ -4754,7 +4754,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedInt64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.repeatedInt64_);
+ result.repeatedInt64_.Add(values);
return this;
}
public Builder ClearRepeatedInt64() {
@@ -4785,7 +4785,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedUint32(scg::IEnumerable<uint> values) {
- base.AddRange(values, result.repeatedUint32_);
+ result.repeatedUint32_.Add(values);
return this;
}
public Builder ClearRepeatedUint32() {
@@ -4816,7 +4816,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedUint64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.repeatedUint64_);
+ result.repeatedUint64_.Add(values);
return this;
}
public Builder ClearRepeatedUint64() {
@@ -4842,7 +4842,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedSint32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.repeatedSint32_);
+ result.repeatedSint32_.Add(values);
return this;
}
public Builder ClearRepeatedSint32() {
@@ -4868,7 +4868,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedSint64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.repeatedSint64_);
+ result.repeatedSint64_.Add(values);
return this;
}
public Builder ClearRepeatedSint64() {
@@ -4899,7 +4899,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedFixed32(scg::IEnumerable<uint> values) {
- base.AddRange(values, result.repeatedFixed32_);
+ result.repeatedFixed32_.Add(values);
return this;
}
public Builder ClearRepeatedFixed32() {
@@ -4930,7 +4930,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedFixed64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.repeatedFixed64_);
+ result.repeatedFixed64_.Add(values);
return this;
}
public Builder ClearRepeatedFixed64() {
@@ -4956,7 +4956,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedSfixed32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.repeatedSfixed32_);
+ result.repeatedSfixed32_.Add(values);
return this;
}
public Builder ClearRepeatedSfixed32() {
@@ -4982,7 +4982,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedSfixed64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.repeatedSfixed64_);
+ result.repeatedSfixed64_.Add(values);
return this;
}
public Builder ClearRepeatedSfixed64() {
@@ -5008,7 +5008,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedFloat(scg::IEnumerable<float> values) {
- base.AddRange(values, result.repeatedFloat_);
+ result.repeatedFloat_.Add(values);
return this;
}
public Builder ClearRepeatedFloat() {
@@ -5034,7 +5034,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedDouble(scg::IEnumerable<double> values) {
- base.AddRange(values, result.repeatedDouble_);
+ result.repeatedDouble_.Add(values);
return this;
}
public Builder ClearRepeatedDouble() {
@@ -5060,7 +5060,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedBool(scg::IEnumerable<bool> values) {
- base.AddRange(values, result.repeatedBool_);
+ result.repeatedBool_.Add(values);
return this;
}
public Builder ClearRepeatedBool() {
@@ -5088,7 +5088,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedString(scg::IEnumerable<string> values) {
- base.AddRange(values, result.repeatedString_);
+ result.repeatedString_.Add(values);
return this;
}
public Builder ClearRepeatedString() {
@@ -5116,7 +5116,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedBytes(scg::IEnumerable<pb::ByteString> values) {
- base.AddRange(values, result.repeatedBytes_);
+ result.repeatedBytes_.Add(values);
return this;
}
public Builder ClearRepeatedBytes() {
@@ -5154,7 +5154,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedGroup(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypesLite.Types.RepeatedGroup> values) {
- base.AddRange(values, result.repeatedGroup_);
+ result.repeatedGroup_.Add(values);
return this;
}
public Builder ClearRepeatedGroup() {
@@ -5192,7 +5192,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedNestedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypesLite.Types.NestedMessage> values) {
- base.AddRange(values, result.repeatedNestedMessage_);
+ result.repeatedNestedMessage_.Add(values);
return this;
}
public Builder ClearRepeatedNestedMessage() {
@@ -5230,7 +5230,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedForeignMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignMessageLite> values) {
- base.AddRange(values, result.repeatedForeignMessage_);
+ result.repeatedForeignMessage_.Add(values);
return this;
}
public Builder ClearRepeatedForeignMessage() {
@@ -5268,7 +5268,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedImportMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ImportMessageLite> values) {
- base.AddRange(values, result.repeatedImportMessage_);
+ result.repeatedImportMessage_.Add(values);
return this;
}
public Builder ClearRepeatedImportMessage() {
@@ -5294,7 +5294,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedNestedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypesLite.Types.NestedEnum> values) {
- base.AddRange(values, result.repeatedNestedEnum_);
+ result.repeatedNestedEnum_.Add(values);
return this;
}
public Builder ClearRepeatedNestedEnum() {
@@ -5320,7 +5320,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedForeignEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnumLite> values) {
- base.AddRange(values, result.repeatedForeignEnum_);
+ result.repeatedForeignEnum_.Add(values);
return this;
}
public Builder ClearRepeatedForeignEnum() {
@@ -5346,7 +5346,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedImportEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ImportEnumLite> values) {
- base.AddRange(values, result.repeatedImportEnum_);
+ result.repeatedImportEnum_.Add(values);
return this;
}
public Builder ClearRepeatedImportEnum() {
@@ -5374,7 +5374,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedStringPiece(scg::IEnumerable<string> values) {
- base.AddRange(values, result.repeatedStringPiece_);
+ result.repeatedStringPiece_.Add(values);
return this;
}
public Builder ClearRepeatedStringPiece() {
@@ -5402,7 +5402,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedCord(scg::IEnumerable<string> values) {
- base.AddRange(values, result.repeatedCord_);
+ result.repeatedCord_.Add(values);
return this;
}
public Builder ClearRepeatedCord() {
@@ -6632,46 +6632,46 @@ namespace Google.ProtocolBuffers.TestProtos { public override Builder MergeFrom(TestPackedTypesLite other) {
if (other == global::Google.ProtocolBuffers.TestProtos.TestPackedTypesLite.DefaultInstance) return this;
if (other.packedInt32_.Count != 0) {
- base.AddRange(other.packedInt32_, result.packedInt32_);
+ result.packedInt32_.Add(other.packedInt32_);
}
if (other.packedInt64_.Count != 0) {
- base.AddRange(other.packedInt64_, result.packedInt64_);
+ result.packedInt64_.Add(other.packedInt64_);
}
if (other.packedUint32_.Count != 0) {
- base.AddRange(other.packedUint32_, result.packedUint32_);
+ result.packedUint32_.Add(other.packedUint32_);
}
if (other.packedUint64_.Count != 0) {
- base.AddRange(other.packedUint64_, result.packedUint64_);
+ result.packedUint64_.Add(other.packedUint64_);
}
if (other.packedSint32_.Count != 0) {
- base.AddRange(other.packedSint32_, result.packedSint32_);
+ result.packedSint32_.Add(other.packedSint32_);
}
if (other.packedSint64_.Count != 0) {
- base.AddRange(other.packedSint64_, result.packedSint64_);
+ result.packedSint64_.Add(other.packedSint64_);
}
if (other.packedFixed32_.Count != 0) {
- base.AddRange(other.packedFixed32_, result.packedFixed32_);
+ result.packedFixed32_.Add(other.packedFixed32_);
}
if (other.packedFixed64_.Count != 0) {
- base.AddRange(other.packedFixed64_, result.packedFixed64_);
+ result.packedFixed64_.Add(other.packedFixed64_);
}
if (other.packedSfixed32_.Count != 0) {
- base.AddRange(other.packedSfixed32_, result.packedSfixed32_);
+ result.packedSfixed32_.Add(other.packedSfixed32_);
}
if (other.packedSfixed64_.Count != 0) {
- base.AddRange(other.packedSfixed64_, result.packedSfixed64_);
+ result.packedSfixed64_.Add(other.packedSfixed64_);
}
if (other.packedFloat_.Count != 0) {
- base.AddRange(other.packedFloat_, result.packedFloat_);
+ result.packedFloat_.Add(other.packedFloat_);
}
if (other.packedDouble_.Count != 0) {
- base.AddRange(other.packedDouble_, result.packedDouble_);
+ result.packedDouble_.Add(other.packedDouble_);
}
if (other.packedBool_.Count != 0) {
- base.AddRange(other.packedBool_, result.packedBool_);
+ result.packedBool_.Add(other.packedBool_);
}
if (other.packedEnum_.Count != 0) {
- base.AddRange(other.packedEnum_, result.packedEnum_);
+ result.packedEnum_.Add(other.packedEnum_);
}
return this;
}
@@ -6800,7 +6800,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedInt32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.packedInt32_);
+ result.packedInt32_.Add(values);
return this;
}
public Builder ClearPackedInt32() {
@@ -6826,7 +6826,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedInt64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.packedInt64_);
+ result.packedInt64_.Add(values);
return this;
}
public Builder ClearPackedInt64() {
@@ -6857,7 +6857,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangePackedUint32(scg::IEnumerable<uint> values) {
- base.AddRange(values, result.packedUint32_);
+ result.packedUint32_.Add(values);
return this;
}
public Builder ClearPackedUint32() {
@@ -6888,7 +6888,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangePackedUint64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.packedUint64_);
+ result.packedUint64_.Add(values);
return this;
}
public Builder ClearPackedUint64() {
@@ -6914,7 +6914,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedSint32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.packedSint32_);
+ result.packedSint32_.Add(values);
return this;
}
public Builder ClearPackedSint32() {
@@ -6940,7 +6940,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedSint64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.packedSint64_);
+ result.packedSint64_.Add(values);
return this;
}
public Builder ClearPackedSint64() {
@@ -6971,7 +6971,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangePackedFixed32(scg::IEnumerable<uint> values) {
- base.AddRange(values, result.packedFixed32_);
+ result.packedFixed32_.Add(values);
return this;
}
public Builder ClearPackedFixed32() {
@@ -7002,7 +7002,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangePackedFixed64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.packedFixed64_);
+ result.packedFixed64_.Add(values);
return this;
}
public Builder ClearPackedFixed64() {
@@ -7028,7 +7028,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedSfixed32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.packedSfixed32_);
+ result.packedSfixed32_.Add(values);
return this;
}
public Builder ClearPackedSfixed32() {
@@ -7054,7 +7054,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedSfixed64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.packedSfixed64_);
+ result.packedSfixed64_.Add(values);
return this;
}
public Builder ClearPackedSfixed64() {
@@ -7080,7 +7080,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedFloat(scg::IEnumerable<float> values) {
- base.AddRange(values, result.packedFloat_);
+ result.packedFloat_.Add(values);
return this;
}
public Builder ClearPackedFloat() {
@@ -7106,7 +7106,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedDouble(scg::IEnumerable<double> values) {
- base.AddRange(values, result.packedDouble_);
+ result.packedDouble_.Add(values);
return this;
}
public Builder ClearPackedDouble() {
@@ -7132,7 +7132,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedBool(scg::IEnumerable<bool> values) {
- base.AddRange(values, result.packedBool_);
+ result.packedBool_.Add(values);
return this;
}
public Builder ClearPackedBool() {
@@ -7158,7 +7158,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnumLite> values) {
- base.AddRange(values, result.packedEnum_);
+ result.packedEnum_.Add(values);
return this;
}
public Builder ClearPackedEnum() {
@@ -7731,46 +7731,46 @@ namespace Google.ProtocolBuffers.TestProtos { public override Builder MergeFrom(TestUnpackedTypesLite other) {
if (other == global::Google.ProtocolBuffers.TestProtos.TestUnpackedTypesLite.DefaultInstance) return this;
if (other.unpackedInt32_.Count != 0) {
- base.AddRange(other.unpackedInt32_, result.unpackedInt32_);
+ result.unpackedInt32_.Add(other.unpackedInt32_);
}
if (other.unpackedInt64_.Count != 0) {
- base.AddRange(other.unpackedInt64_, result.unpackedInt64_);
+ result.unpackedInt64_.Add(other.unpackedInt64_);
}
if (other.unpackedUint32_.Count != 0) {
- base.AddRange(other.unpackedUint32_, result.unpackedUint32_);
+ result.unpackedUint32_.Add(other.unpackedUint32_);
}
if (other.unpackedUint64_.Count != 0) {
- base.AddRange(other.unpackedUint64_, result.unpackedUint64_);
+ result.unpackedUint64_.Add(other.unpackedUint64_);
}
if (other.unpackedSint32_.Count != 0) {
- base.AddRange(other.unpackedSint32_, result.unpackedSint32_);
+ result.unpackedSint32_.Add(other.unpackedSint32_);
}
if (other.unpackedSint64_.Count != 0) {
- base.AddRange(other.unpackedSint64_, result.unpackedSint64_);
+ result.unpackedSint64_.Add(other.unpackedSint64_);
}
if (other.unpackedFixed32_.Count != 0) {
- base.AddRange(other.unpackedFixed32_, result.unpackedFixed32_);
+ result.unpackedFixed32_.Add(other.unpackedFixed32_);
}
if (other.unpackedFixed64_.Count != 0) {
- base.AddRange(other.unpackedFixed64_, result.unpackedFixed64_);
+ result.unpackedFixed64_.Add(other.unpackedFixed64_);
}
if (other.unpackedSfixed32_.Count != 0) {
- base.AddRange(other.unpackedSfixed32_, result.unpackedSfixed32_);
+ result.unpackedSfixed32_.Add(other.unpackedSfixed32_);
}
if (other.unpackedSfixed64_.Count != 0) {
- base.AddRange(other.unpackedSfixed64_, result.unpackedSfixed64_);
+ result.unpackedSfixed64_.Add(other.unpackedSfixed64_);
}
if (other.unpackedFloat_.Count != 0) {
- base.AddRange(other.unpackedFloat_, result.unpackedFloat_);
+ result.unpackedFloat_.Add(other.unpackedFloat_);
}
if (other.unpackedDouble_.Count != 0) {
- base.AddRange(other.unpackedDouble_, result.unpackedDouble_);
+ result.unpackedDouble_.Add(other.unpackedDouble_);
}
if (other.unpackedBool_.Count != 0) {
- base.AddRange(other.unpackedBool_, result.unpackedBool_);
+ result.unpackedBool_.Add(other.unpackedBool_);
}
if (other.unpackedEnum_.Count != 0) {
- base.AddRange(other.unpackedEnum_, result.unpackedEnum_);
+ result.unpackedEnum_.Add(other.unpackedEnum_);
}
return this;
}
@@ -7899,7 +7899,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedInt32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.unpackedInt32_);
+ result.unpackedInt32_.Add(values);
return this;
}
public Builder ClearUnpackedInt32() {
@@ -7925,7 +7925,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedInt64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.unpackedInt64_);
+ result.unpackedInt64_.Add(values);
return this;
}
public Builder ClearUnpackedInt64() {
@@ -7956,7 +7956,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedUint32(scg::IEnumerable<uint> values) {
- base.AddRange(values, result.unpackedUint32_);
+ result.unpackedUint32_.Add(values);
return this;
}
public Builder ClearUnpackedUint32() {
@@ -7987,7 +7987,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedUint64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.unpackedUint64_);
+ result.unpackedUint64_.Add(values);
return this;
}
public Builder ClearUnpackedUint64() {
@@ -8013,7 +8013,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedSint32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.unpackedSint32_);
+ result.unpackedSint32_.Add(values);
return this;
}
public Builder ClearUnpackedSint32() {
@@ -8039,7 +8039,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedSint64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.unpackedSint64_);
+ result.unpackedSint64_.Add(values);
return this;
}
public Builder ClearUnpackedSint64() {
@@ -8070,7 +8070,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedFixed32(scg::IEnumerable<uint> values) {
- base.AddRange(values, result.unpackedFixed32_);
+ result.unpackedFixed32_.Add(values);
return this;
}
public Builder ClearUnpackedFixed32() {
@@ -8101,7 +8101,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedFixed64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.unpackedFixed64_);
+ result.unpackedFixed64_.Add(values);
return this;
}
public Builder ClearUnpackedFixed64() {
@@ -8127,7 +8127,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedSfixed32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.unpackedSfixed32_);
+ result.unpackedSfixed32_.Add(values);
return this;
}
public Builder ClearUnpackedSfixed32() {
@@ -8153,7 +8153,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedSfixed64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.unpackedSfixed64_);
+ result.unpackedSfixed64_.Add(values);
return this;
}
public Builder ClearUnpackedSfixed64() {
@@ -8179,7 +8179,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedFloat(scg::IEnumerable<float> values) {
- base.AddRange(values, result.unpackedFloat_);
+ result.unpackedFloat_.Add(values);
return this;
}
public Builder ClearUnpackedFloat() {
@@ -8205,7 +8205,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedDouble(scg::IEnumerable<double> values) {
- base.AddRange(values, result.unpackedDouble_);
+ result.unpackedDouble_.Add(values);
return this;
}
public Builder ClearUnpackedDouble() {
@@ -8231,7 +8231,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedBool(scg::IEnumerable<bool> values) {
- base.AddRange(values, result.unpackedBool_);
+ result.unpackedBool_.Add(values);
return this;
}
public Builder ClearUnpackedBool() {
@@ -8257,7 +8257,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnumLite> values) {
- base.AddRange(values, result.unpackedEnum_);
+ result.unpackedEnum_.Add(values);
return this;
}
public Builder ClearUnpackedEnum() {
diff --git a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestProtoFile.cs b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestProtoFile.cs index d8824d49..49efaecd 100644 --- a/src/ProtocolBuffersLite.Test/TestProtos/UnitTestProtoFile.cs +++ b/src/ProtocolBuffersLite.Test/TestProtos/UnitTestProtoFile.cs @@ -3333,76 +3333,76 @@ namespace Google.ProtocolBuffers.TestProtos { OptionalCord = other.OptionalCord;
}
if (other.repeatedInt32_.Count != 0) {
- base.AddRange(other.repeatedInt32_, result.repeatedInt32_);
+ result.repeatedInt32_.Add(other.repeatedInt32_);
}
if (other.repeatedInt64_.Count != 0) {
- base.AddRange(other.repeatedInt64_, result.repeatedInt64_);
+ result.repeatedInt64_.Add(other.repeatedInt64_);
}
if (other.repeatedUint32_.Count != 0) {
- base.AddRange(other.repeatedUint32_, result.repeatedUint32_);
+ result.repeatedUint32_.Add(other.repeatedUint32_);
}
if (other.repeatedUint64_.Count != 0) {
- base.AddRange(other.repeatedUint64_, result.repeatedUint64_);
+ result.repeatedUint64_.Add(other.repeatedUint64_);
}
if (other.repeatedSint32_.Count != 0) {
- base.AddRange(other.repeatedSint32_, result.repeatedSint32_);
+ result.repeatedSint32_.Add(other.repeatedSint32_);
}
if (other.repeatedSint64_.Count != 0) {
- base.AddRange(other.repeatedSint64_, result.repeatedSint64_);
+ result.repeatedSint64_.Add(other.repeatedSint64_);
}
if (other.repeatedFixed32_.Count != 0) {
- base.AddRange(other.repeatedFixed32_, result.repeatedFixed32_);
+ result.repeatedFixed32_.Add(other.repeatedFixed32_);
}
if (other.repeatedFixed64_.Count != 0) {
- base.AddRange(other.repeatedFixed64_, result.repeatedFixed64_);
+ result.repeatedFixed64_.Add(other.repeatedFixed64_);
}
if (other.repeatedSfixed32_.Count != 0) {
- base.AddRange(other.repeatedSfixed32_, result.repeatedSfixed32_);
+ result.repeatedSfixed32_.Add(other.repeatedSfixed32_);
}
if (other.repeatedSfixed64_.Count != 0) {
- base.AddRange(other.repeatedSfixed64_, result.repeatedSfixed64_);
+ result.repeatedSfixed64_.Add(other.repeatedSfixed64_);
}
if (other.repeatedFloat_.Count != 0) {
- base.AddRange(other.repeatedFloat_, result.repeatedFloat_);
+ result.repeatedFloat_.Add(other.repeatedFloat_);
}
if (other.repeatedDouble_.Count != 0) {
- base.AddRange(other.repeatedDouble_, result.repeatedDouble_);
+ result.repeatedDouble_.Add(other.repeatedDouble_);
}
if (other.repeatedBool_.Count != 0) {
- base.AddRange(other.repeatedBool_, result.repeatedBool_);
+ result.repeatedBool_.Add(other.repeatedBool_);
}
if (other.repeatedString_.Count != 0) {
- base.AddRange(other.repeatedString_, result.repeatedString_);
+ result.repeatedString_.Add(other.repeatedString_);
}
if (other.repeatedBytes_.Count != 0) {
- base.AddRange(other.repeatedBytes_, result.repeatedBytes_);
+ result.repeatedBytes_.Add(other.repeatedBytes_);
}
if (other.repeatedGroup_.Count != 0) {
- base.AddRange(other.repeatedGroup_, result.repeatedGroup_);
+ result.repeatedGroup_.Add(other.repeatedGroup_);
}
if (other.repeatedNestedMessage_.Count != 0) {
- base.AddRange(other.repeatedNestedMessage_, result.repeatedNestedMessage_);
+ result.repeatedNestedMessage_.Add(other.repeatedNestedMessage_);
}
if (other.repeatedForeignMessage_.Count != 0) {
- base.AddRange(other.repeatedForeignMessage_, result.repeatedForeignMessage_);
+ result.repeatedForeignMessage_.Add(other.repeatedForeignMessage_);
}
if (other.repeatedImportMessage_.Count != 0) {
- base.AddRange(other.repeatedImportMessage_, result.repeatedImportMessage_);
+ result.repeatedImportMessage_.Add(other.repeatedImportMessage_);
}
if (other.repeatedNestedEnum_.Count != 0) {
- base.AddRange(other.repeatedNestedEnum_, result.repeatedNestedEnum_);
+ result.repeatedNestedEnum_.Add(other.repeatedNestedEnum_);
}
if (other.repeatedForeignEnum_.Count != 0) {
- base.AddRange(other.repeatedForeignEnum_, result.repeatedForeignEnum_);
+ result.repeatedForeignEnum_.Add(other.repeatedForeignEnum_);
}
if (other.repeatedImportEnum_.Count != 0) {
- base.AddRange(other.repeatedImportEnum_, result.repeatedImportEnum_);
+ result.repeatedImportEnum_.Add(other.repeatedImportEnum_);
}
if (other.repeatedStringPiece_.Count != 0) {
- base.AddRange(other.repeatedStringPiece_, result.repeatedStringPiece_);
+ result.repeatedStringPiece_.Add(other.repeatedStringPiece_);
}
if (other.repeatedCord_.Count != 0) {
- base.AddRange(other.repeatedCord_, result.repeatedCord_);
+ result.repeatedCord_.Add(other.repeatedCord_);
}
if (other.HasDefaultInt32) {
DefaultInt32 = other.DefaultInt32;
@@ -4433,7 +4433,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedInt32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.repeatedInt32_);
+ result.repeatedInt32_.Add(values);
return this;
}
public Builder ClearRepeatedInt32() {
@@ -4459,7 +4459,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedInt64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.repeatedInt64_);
+ result.repeatedInt64_.Add(values);
return this;
}
public Builder ClearRepeatedInt64() {
@@ -4490,7 +4490,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedUint32(scg::IEnumerable<uint> values) {
- base.AddRange(values, result.repeatedUint32_);
+ result.repeatedUint32_.Add(values);
return this;
}
public Builder ClearRepeatedUint32() {
@@ -4521,7 +4521,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedUint64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.repeatedUint64_);
+ result.repeatedUint64_.Add(values);
return this;
}
public Builder ClearRepeatedUint64() {
@@ -4547,7 +4547,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedSint32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.repeatedSint32_);
+ result.repeatedSint32_.Add(values);
return this;
}
public Builder ClearRepeatedSint32() {
@@ -4573,7 +4573,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedSint64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.repeatedSint64_);
+ result.repeatedSint64_.Add(values);
return this;
}
public Builder ClearRepeatedSint64() {
@@ -4604,7 +4604,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedFixed32(scg::IEnumerable<uint> values) {
- base.AddRange(values, result.repeatedFixed32_);
+ result.repeatedFixed32_.Add(values);
return this;
}
public Builder ClearRepeatedFixed32() {
@@ -4635,7 +4635,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedFixed64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.repeatedFixed64_);
+ result.repeatedFixed64_.Add(values);
return this;
}
public Builder ClearRepeatedFixed64() {
@@ -4661,7 +4661,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedSfixed32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.repeatedSfixed32_);
+ result.repeatedSfixed32_.Add(values);
return this;
}
public Builder ClearRepeatedSfixed32() {
@@ -4687,7 +4687,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedSfixed64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.repeatedSfixed64_);
+ result.repeatedSfixed64_.Add(values);
return this;
}
public Builder ClearRepeatedSfixed64() {
@@ -4713,7 +4713,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedFloat(scg::IEnumerable<float> values) {
- base.AddRange(values, result.repeatedFloat_);
+ result.repeatedFloat_.Add(values);
return this;
}
public Builder ClearRepeatedFloat() {
@@ -4739,7 +4739,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedDouble(scg::IEnumerable<double> values) {
- base.AddRange(values, result.repeatedDouble_);
+ result.repeatedDouble_.Add(values);
return this;
}
public Builder ClearRepeatedDouble() {
@@ -4765,7 +4765,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedBool(scg::IEnumerable<bool> values) {
- base.AddRange(values, result.repeatedBool_);
+ result.repeatedBool_.Add(values);
return this;
}
public Builder ClearRepeatedBool() {
@@ -4793,7 +4793,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedString(scg::IEnumerable<string> values) {
- base.AddRange(values, result.repeatedString_);
+ result.repeatedString_.Add(values);
return this;
}
public Builder ClearRepeatedString() {
@@ -4821,7 +4821,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedBytes(scg::IEnumerable<pb::ByteString> values) {
- base.AddRange(values, result.repeatedBytes_);
+ result.repeatedBytes_.Add(values);
return this;
}
public Builder ClearRepeatedBytes() {
@@ -4859,7 +4859,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedGroup(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup> values) {
- base.AddRange(values, result.repeatedGroup_);
+ result.repeatedGroup_.Add(values);
return this;
}
public Builder ClearRepeatedGroup() {
@@ -4897,7 +4897,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedNestedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage> values) {
- base.AddRange(values, result.repeatedNestedMessage_);
+ result.repeatedNestedMessage_.Add(values);
return this;
}
public Builder ClearRepeatedNestedMessage() {
@@ -4935,7 +4935,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedForeignMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> values) {
- base.AddRange(values, result.repeatedForeignMessage_);
+ result.repeatedForeignMessage_.Add(values);
return this;
}
public Builder ClearRepeatedForeignMessage() {
@@ -4973,7 +4973,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedImportMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ImportMessage> values) {
- base.AddRange(values, result.repeatedImportMessage_);
+ result.repeatedImportMessage_.Add(values);
return this;
}
public Builder ClearRepeatedImportMessage() {
@@ -4999,7 +4999,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedNestedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum> values) {
- base.AddRange(values, result.repeatedNestedEnum_);
+ result.repeatedNestedEnum_.Add(values);
return this;
}
public Builder ClearRepeatedNestedEnum() {
@@ -5025,7 +5025,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedForeignEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
- base.AddRange(values, result.repeatedForeignEnum_);
+ result.repeatedForeignEnum_.Add(values);
return this;
}
public Builder ClearRepeatedForeignEnum() {
@@ -5051,7 +5051,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedImportEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ImportEnum> values) {
- base.AddRange(values, result.repeatedImportEnum_);
+ result.repeatedImportEnum_.Add(values);
return this;
}
public Builder ClearRepeatedImportEnum() {
@@ -5079,7 +5079,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedStringPiece(scg::IEnumerable<string> values) {
- base.AddRange(values, result.repeatedStringPiece_);
+ result.repeatedStringPiece_.Add(values);
return this;
}
public Builder ClearRepeatedStringPiece() {
@@ -5107,7 +5107,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedCord(scg::IEnumerable<string> values) {
- base.AddRange(values, result.repeatedCord_);
+ result.repeatedCord_.Add(values);
return this;
}
public Builder ClearRepeatedCord() {
@@ -8611,7 +8611,7 @@ namespace Google.ProtocolBuffers.TestProtos { MergeOptionalMessage(other.OptionalMessage);
}
if (other.repeatedMessage_.Count != 0) {
- base.AddRange(other.repeatedMessage_, result.repeatedMessage_);
+ result.repeatedMessage_.Add(other.repeatedMessage_);
}
if (other.HasDummy) {
Dummy = other.Dummy;
@@ -8751,7 +8751,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestRequired> values) {
- base.AddRange(values, result.repeatedMessage_);
+ result.repeatedMessage_.Add(values);
return this;
}
public Builder ClearRepeatedMessage() {
@@ -11868,10 +11868,10 @@ namespace Google.ProtocolBuffers.TestProtos { public override Builder MergeFrom(NestedMessage other) {
if (other == global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.DefaultInstance) return this;
if (other.nestedmessageRepeatedInt32_.Count != 0) {
- base.AddRange(other.nestedmessageRepeatedInt32_, result.nestedmessageRepeatedInt32_);
+ result.nestedmessageRepeatedInt32_.Add(other.nestedmessageRepeatedInt32_);
}
if (other.nestedmessageRepeatedForeignmessage_.Count != 0) {
- base.AddRange(other.nestedmessageRepeatedForeignmessage_, result.nestedmessageRepeatedForeignmessage_);
+ result.nestedmessageRepeatedForeignmessage_.Add(other.nestedmessageRepeatedForeignmessage_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -11952,7 +11952,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeNestedmessageRepeatedInt32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.nestedmessageRepeatedInt32_);
+ result.nestedmessageRepeatedInt32_.Add(values);
return this;
}
public Builder ClearNestedmessageRepeatedInt32() {
@@ -11990,7 +11990,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeNestedmessageRepeatedForeignmessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> values) {
- base.AddRange(values, result.nestedmessageRepeatedForeignmessage_);
+ result.nestedmessageRepeatedForeignmessage_.Add(values);
return this;
}
public Builder ClearNestedmessageRepeatedForeignmessage() {
@@ -12638,22 +12638,22 @@ namespace Google.ProtocolBuffers.TestProtos { CordField = other.CordField;
}
if (other.repeatedPrimitiveField_.Count != 0) {
- base.AddRange(other.repeatedPrimitiveField_, result.repeatedPrimitiveField_);
+ result.repeatedPrimitiveField_.Add(other.repeatedPrimitiveField_);
}
if (other.repeatedStringField_.Count != 0) {
- base.AddRange(other.repeatedStringField_, result.repeatedStringField_);
+ result.repeatedStringField_.Add(other.repeatedStringField_);
}
if (other.repeatedEnumField_.Count != 0) {
- base.AddRange(other.repeatedEnumField_, result.repeatedEnumField_);
+ result.repeatedEnumField_.Add(other.repeatedEnumField_);
}
if (other.repeatedMessageField_.Count != 0) {
- base.AddRange(other.repeatedMessageField_, result.repeatedMessageField_);
+ result.repeatedMessageField_.Add(other.repeatedMessageField_);
}
if (other.repeatedStringPieceField_.Count != 0) {
- base.AddRange(other.repeatedStringPieceField_, result.repeatedStringPieceField_);
+ result.repeatedStringPieceField_.Add(other.repeatedStringPieceField_);
}
if (other.repeatedCordField_.Count != 0) {
- base.AddRange(other.repeatedCordField_, result.repeatedCordField_);
+ result.repeatedCordField_.Add(other.repeatedCordField_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -12926,7 +12926,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedPrimitiveField(scg::IEnumerable<int> values) {
- base.AddRange(values, result.repeatedPrimitiveField_);
+ result.repeatedPrimitiveField_.Add(values);
return this;
}
public Builder ClearRepeatedPrimitiveField() {
@@ -12954,7 +12954,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedStringField(scg::IEnumerable<string> values) {
- base.AddRange(values, result.repeatedStringField_);
+ result.repeatedStringField_.Add(values);
return this;
}
public Builder ClearRepeatedStringField() {
@@ -12980,7 +12980,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedEnumField(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
- base.AddRange(values, result.repeatedEnumField_);
+ result.repeatedEnumField_.Add(values);
return this;
}
public Builder ClearRepeatedEnumField() {
@@ -13018,7 +13018,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedMessageField(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> values) {
- base.AddRange(values, result.repeatedMessageField_);
+ result.repeatedMessageField_.Add(values);
return this;
}
public Builder ClearRepeatedMessageField() {
@@ -13046,7 +13046,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedStringPieceField(scg::IEnumerable<string> values) {
- base.AddRange(values, result.repeatedStringPieceField_);
+ result.repeatedStringPieceField_.Add(values);
return this;
}
public Builder ClearRepeatedStringPieceField() {
@@ -13074,7 +13074,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedCordField(scg::IEnumerable<string> values) {
- base.AddRange(values, result.repeatedCordField_);
+ result.repeatedCordField_.Add(values);
return this;
}
public Builder ClearRepeatedCordField() {
@@ -15409,46 +15409,46 @@ namespace Google.ProtocolBuffers.TestProtos { public override Builder MergeFrom(TestPackedTypes other) {
if (other == global::Google.ProtocolBuffers.TestProtos.TestPackedTypes.DefaultInstance) return this;
if (other.packedInt32_.Count != 0) {
- base.AddRange(other.packedInt32_, result.packedInt32_);
+ result.packedInt32_.Add(other.packedInt32_);
}
if (other.packedInt64_.Count != 0) {
- base.AddRange(other.packedInt64_, result.packedInt64_);
+ result.packedInt64_.Add(other.packedInt64_);
}
if (other.packedUint32_.Count != 0) {
- base.AddRange(other.packedUint32_, result.packedUint32_);
+ result.packedUint32_.Add(other.packedUint32_);
}
if (other.packedUint64_.Count != 0) {
- base.AddRange(other.packedUint64_, result.packedUint64_);
+ result.packedUint64_.Add(other.packedUint64_);
}
if (other.packedSint32_.Count != 0) {
- base.AddRange(other.packedSint32_, result.packedSint32_);
+ result.packedSint32_.Add(other.packedSint32_);
}
if (other.packedSint64_.Count != 0) {
- base.AddRange(other.packedSint64_, result.packedSint64_);
+ result.packedSint64_.Add(other.packedSint64_);
}
if (other.packedFixed32_.Count != 0) {
- base.AddRange(other.packedFixed32_, result.packedFixed32_);
+ result.packedFixed32_.Add(other.packedFixed32_);
}
if (other.packedFixed64_.Count != 0) {
- base.AddRange(other.packedFixed64_, result.packedFixed64_);
+ result.packedFixed64_.Add(other.packedFixed64_);
}
if (other.packedSfixed32_.Count != 0) {
- base.AddRange(other.packedSfixed32_, result.packedSfixed32_);
+ result.packedSfixed32_.Add(other.packedSfixed32_);
}
if (other.packedSfixed64_.Count != 0) {
- base.AddRange(other.packedSfixed64_, result.packedSfixed64_);
+ result.packedSfixed64_.Add(other.packedSfixed64_);
}
if (other.packedFloat_.Count != 0) {
- base.AddRange(other.packedFloat_, result.packedFloat_);
+ result.packedFloat_.Add(other.packedFloat_);
}
if (other.packedDouble_.Count != 0) {
- base.AddRange(other.packedDouble_, result.packedDouble_);
+ result.packedDouble_.Add(other.packedDouble_);
}
if (other.packedBool_.Count != 0) {
- base.AddRange(other.packedBool_, result.packedBool_);
+ result.packedBool_.Add(other.packedBool_);
}
if (other.packedEnum_.Count != 0) {
- base.AddRange(other.packedEnum_, result.packedEnum_);
+ result.packedEnum_.Add(other.packedEnum_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -15599,7 +15599,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedInt32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.packedInt32_);
+ result.packedInt32_.Add(values);
return this;
}
public Builder ClearPackedInt32() {
@@ -15625,7 +15625,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedInt64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.packedInt64_);
+ result.packedInt64_.Add(values);
return this;
}
public Builder ClearPackedInt64() {
@@ -15656,7 +15656,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangePackedUint32(scg::IEnumerable<uint> values) {
- base.AddRange(values, result.packedUint32_);
+ result.packedUint32_.Add(values);
return this;
}
public Builder ClearPackedUint32() {
@@ -15687,7 +15687,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangePackedUint64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.packedUint64_);
+ result.packedUint64_.Add(values);
return this;
}
public Builder ClearPackedUint64() {
@@ -15713,7 +15713,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedSint32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.packedSint32_);
+ result.packedSint32_.Add(values);
return this;
}
public Builder ClearPackedSint32() {
@@ -15739,7 +15739,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedSint64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.packedSint64_);
+ result.packedSint64_.Add(values);
return this;
}
public Builder ClearPackedSint64() {
@@ -15770,7 +15770,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangePackedFixed32(scg::IEnumerable<uint> values) {
- base.AddRange(values, result.packedFixed32_);
+ result.packedFixed32_.Add(values);
return this;
}
public Builder ClearPackedFixed32() {
@@ -15801,7 +15801,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangePackedFixed64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.packedFixed64_);
+ result.packedFixed64_.Add(values);
return this;
}
public Builder ClearPackedFixed64() {
@@ -15827,7 +15827,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedSfixed32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.packedSfixed32_);
+ result.packedSfixed32_.Add(values);
return this;
}
public Builder ClearPackedSfixed32() {
@@ -15853,7 +15853,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedSfixed64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.packedSfixed64_);
+ result.packedSfixed64_.Add(values);
return this;
}
public Builder ClearPackedSfixed64() {
@@ -15879,7 +15879,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedFloat(scg::IEnumerable<float> values) {
- base.AddRange(values, result.packedFloat_);
+ result.packedFloat_.Add(values);
return this;
}
public Builder ClearPackedFloat() {
@@ -15905,7 +15905,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedDouble(scg::IEnumerable<double> values) {
- base.AddRange(values, result.packedDouble_);
+ result.packedDouble_.Add(values);
return this;
}
public Builder ClearPackedDouble() {
@@ -15931,7 +15931,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedBool(scg::IEnumerable<bool> values) {
- base.AddRange(values, result.packedBool_);
+ result.packedBool_.Add(values);
return this;
}
public Builder ClearPackedBool() {
@@ -15957,7 +15957,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
- base.AddRange(values, result.packedEnum_);
+ result.packedEnum_.Add(values);
return this;
}
public Builder ClearPackedEnum() {
@@ -16444,46 +16444,46 @@ namespace Google.ProtocolBuffers.TestProtos { public override Builder MergeFrom(TestUnpackedTypes other) {
if (other == global::Google.ProtocolBuffers.TestProtos.TestUnpackedTypes.DefaultInstance) return this;
if (other.unpackedInt32_.Count != 0) {
- base.AddRange(other.unpackedInt32_, result.unpackedInt32_);
+ result.unpackedInt32_.Add(other.unpackedInt32_);
}
if (other.unpackedInt64_.Count != 0) {
- base.AddRange(other.unpackedInt64_, result.unpackedInt64_);
+ result.unpackedInt64_.Add(other.unpackedInt64_);
}
if (other.unpackedUint32_.Count != 0) {
- base.AddRange(other.unpackedUint32_, result.unpackedUint32_);
+ result.unpackedUint32_.Add(other.unpackedUint32_);
}
if (other.unpackedUint64_.Count != 0) {
- base.AddRange(other.unpackedUint64_, result.unpackedUint64_);
+ result.unpackedUint64_.Add(other.unpackedUint64_);
}
if (other.unpackedSint32_.Count != 0) {
- base.AddRange(other.unpackedSint32_, result.unpackedSint32_);
+ result.unpackedSint32_.Add(other.unpackedSint32_);
}
if (other.unpackedSint64_.Count != 0) {
- base.AddRange(other.unpackedSint64_, result.unpackedSint64_);
+ result.unpackedSint64_.Add(other.unpackedSint64_);
}
if (other.unpackedFixed32_.Count != 0) {
- base.AddRange(other.unpackedFixed32_, result.unpackedFixed32_);
+ result.unpackedFixed32_.Add(other.unpackedFixed32_);
}
if (other.unpackedFixed64_.Count != 0) {
- base.AddRange(other.unpackedFixed64_, result.unpackedFixed64_);
+ result.unpackedFixed64_.Add(other.unpackedFixed64_);
}
if (other.unpackedSfixed32_.Count != 0) {
- base.AddRange(other.unpackedSfixed32_, result.unpackedSfixed32_);
+ result.unpackedSfixed32_.Add(other.unpackedSfixed32_);
}
if (other.unpackedSfixed64_.Count != 0) {
- base.AddRange(other.unpackedSfixed64_, result.unpackedSfixed64_);
+ result.unpackedSfixed64_.Add(other.unpackedSfixed64_);
}
if (other.unpackedFloat_.Count != 0) {
- base.AddRange(other.unpackedFloat_, result.unpackedFloat_);
+ result.unpackedFloat_.Add(other.unpackedFloat_);
}
if (other.unpackedDouble_.Count != 0) {
- base.AddRange(other.unpackedDouble_, result.unpackedDouble_);
+ result.unpackedDouble_.Add(other.unpackedDouble_);
}
if (other.unpackedBool_.Count != 0) {
- base.AddRange(other.unpackedBool_, result.unpackedBool_);
+ result.unpackedBool_.Add(other.unpackedBool_);
}
if (other.unpackedEnum_.Count != 0) {
- base.AddRange(other.unpackedEnum_, result.unpackedEnum_);
+ result.unpackedEnum_.Add(other.unpackedEnum_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -16634,7 +16634,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedInt32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.unpackedInt32_);
+ result.unpackedInt32_.Add(values);
return this;
}
public Builder ClearUnpackedInt32() {
@@ -16660,7 +16660,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedInt64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.unpackedInt64_);
+ result.unpackedInt64_.Add(values);
return this;
}
public Builder ClearUnpackedInt64() {
@@ -16691,7 +16691,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedUint32(scg::IEnumerable<uint> values) {
- base.AddRange(values, result.unpackedUint32_);
+ result.unpackedUint32_.Add(values);
return this;
}
public Builder ClearUnpackedUint32() {
@@ -16722,7 +16722,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedUint64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.unpackedUint64_);
+ result.unpackedUint64_.Add(values);
return this;
}
public Builder ClearUnpackedUint64() {
@@ -16748,7 +16748,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedSint32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.unpackedSint32_);
+ result.unpackedSint32_.Add(values);
return this;
}
public Builder ClearUnpackedSint32() {
@@ -16774,7 +16774,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedSint64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.unpackedSint64_);
+ result.unpackedSint64_.Add(values);
return this;
}
public Builder ClearUnpackedSint64() {
@@ -16805,7 +16805,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedFixed32(scg::IEnumerable<uint> values) {
- base.AddRange(values, result.unpackedFixed32_);
+ result.unpackedFixed32_.Add(values);
return this;
}
public Builder ClearUnpackedFixed32() {
@@ -16836,7 +16836,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeUnpackedFixed64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.unpackedFixed64_);
+ result.unpackedFixed64_.Add(values);
return this;
}
public Builder ClearUnpackedFixed64() {
@@ -16862,7 +16862,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedSfixed32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.unpackedSfixed32_);
+ result.unpackedSfixed32_.Add(values);
return this;
}
public Builder ClearUnpackedSfixed32() {
@@ -16888,7 +16888,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedSfixed64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.unpackedSfixed64_);
+ result.unpackedSfixed64_.Add(values);
return this;
}
public Builder ClearUnpackedSfixed64() {
@@ -16914,7 +16914,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedFloat(scg::IEnumerable<float> values) {
- base.AddRange(values, result.unpackedFloat_);
+ result.unpackedFloat_.Add(values);
return this;
}
public Builder ClearUnpackedFloat() {
@@ -16940,7 +16940,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedDouble(scg::IEnumerable<double> values) {
- base.AddRange(values, result.unpackedDouble_);
+ result.unpackedDouble_.Add(values);
return this;
}
public Builder ClearUnpackedDouble() {
@@ -16966,7 +16966,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedBool(scg::IEnumerable<bool> values) {
- base.AddRange(values, result.unpackedBool_);
+ result.unpackedBool_.Add(values);
return this;
}
public Builder ClearUnpackedBool() {
@@ -16992,7 +16992,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeUnpackedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
- base.AddRange(values, result.unpackedEnum_);
+ result.unpackedEnum_.Add(values);
return this;
}
public Builder ClearUnpackedEnum() {
@@ -17956,10 +17956,10 @@ namespace Google.ProtocolBuffers.TestProtos { MergeDynamicMessageExtension(other.DynamicMessageExtension);
}
if (other.repeatedExtension_.Count != 0) {
- base.AddRange(other.repeatedExtension_, result.repeatedExtension_);
+ result.repeatedExtension_.Add(other.repeatedExtension_);
}
if (other.packedExtension_.Count != 0) {
- base.AddRange(other.packedExtension_, result.packedExtension_);
+ result.packedExtension_.Add(other.packedExtension_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -18216,7 +18216,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedExtension(scg::IEnumerable<string> values) {
- base.AddRange(values, result.repeatedExtension_);
+ result.repeatedExtension_.Add(values);
return this;
}
public Builder ClearRepeatedExtension() {
@@ -18242,7 +18242,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangePackedExtension(scg::IEnumerable<int> values) {
- base.AddRange(values, result.packedExtension_);
+ result.packedExtension_.Add(values);
return this;
}
public Builder ClearPackedExtension() {
@@ -18541,22 +18541,22 @@ namespace Google.ProtocolBuffers.TestProtos { public override Builder MergeFrom(TestRepeatedScalarDifferentTagSizes other) {
if (other == global::Google.ProtocolBuffers.TestProtos.TestRepeatedScalarDifferentTagSizes.DefaultInstance) return this;
if (other.repeatedFixed32_.Count != 0) {
- base.AddRange(other.repeatedFixed32_, result.repeatedFixed32_);
+ result.repeatedFixed32_.Add(other.repeatedFixed32_);
}
if (other.repeatedInt32_.Count != 0) {
- base.AddRange(other.repeatedInt32_, result.repeatedInt32_);
+ result.repeatedInt32_.Add(other.repeatedInt32_);
}
if (other.repeatedFixed64_.Count != 0) {
- base.AddRange(other.repeatedFixed64_, result.repeatedFixed64_);
+ result.repeatedFixed64_.Add(other.repeatedFixed64_);
}
if (other.repeatedInt64_.Count != 0) {
- base.AddRange(other.repeatedInt64_, result.repeatedInt64_);
+ result.repeatedInt64_.Add(other.repeatedInt64_);
}
if (other.repeatedFloat_.Count != 0) {
- base.AddRange(other.repeatedFloat_, result.repeatedFloat_);
+ result.repeatedFloat_.Add(other.repeatedFloat_);
}
if (other.repeatedUint64_.Count != 0) {
- base.AddRange(other.repeatedUint64_, result.repeatedUint64_);
+ result.repeatedUint64_.Add(other.repeatedUint64_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
@@ -18663,7 +18663,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedFixed32(scg::IEnumerable<uint> values) {
- base.AddRange(values, result.repeatedFixed32_);
+ result.repeatedFixed32_.Add(values);
return this;
}
public Builder ClearRepeatedFixed32() {
@@ -18689,7 +18689,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedInt32(scg::IEnumerable<int> values) {
- base.AddRange(values, result.repeatedInt32_);
+ result.repeatedInt32_.Add(values);
return this;
}
public Builder ClearRepeatedInt32() {
@@ -18720,7 +18720,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedFixed64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.repeatedFixed64_);
+ result.repeatedFixed64_.Add(values);
return this;
}
public Builder ClearRepeatedFixed64() {
@@ -18746,7 +18746,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedInt64(scg::IEnumerable<long> values) {
- base.AddRange(values, result.repeatedInt64_);
+ result.repeatedInt64_.Add(values);
return this;
}
public Builder ClearRepeatedInt64() {
@@ -18772,7 +18772,7 @@ namespace Google.ProtocolBuffers.TestProtos { return this;
}
public Builder AddRangeRepeatedFloat(scg::IEnumerable<float> values) {
- base.AddRange(values, result.repeatedFloat_);
+ result.repeatedFloat_.Add(values);
return this;
}
public Builder ClearRepeatedFloat() {
@@ -18803,7 +18803,7 @@ namespace Google.ProtocolBuffers.TestProtos { }
[global::System.CLSCompliant(false)]
public Builder AddRangeRepeatedUint64(scg::IEnumerable<ulong> values) {
- base.AddRange(values, result.repeatedUint64_);
+ result.repeatedUint64_.Add(values);
return this;
}
public Builder ClearRepeatedUint64() {
|