merge issue-21

pull/288/head
csharptest 13 years ago committed by rogerk
commit 026f2b417c
  1. 21
      protos/extest/unittest_issues.proto
  2. 2
      src/AddressBook/AddressBookProtos.cs
  3. 9
      src/ProtoGen/EnumFieldGenerator.cs
  4. 19
      src/ProtoGen/FieldGeneratorBase.cs
  5. 8
      src/ProtoGen/MessageFieldGenerator.cs
  6. 9
      src/ProtoGen/PrimitiveFieldGenerator.cs
  7. 10
      src/ProtoGen/RepeatedEnumFieldGenerator.cs
  8. 12
      src/ProtoGen/RepeatedMessageFieldGenerator.cs
  9. 17
      src/ProtoGen/RepeatedPrimitiveFieldGenerator.cs
  10. 4
      src/ProtoGen/UmbrellaClassGenerator.cs
  11. 102
      src/ProtocolBuffers.Test/DeprecatedMemberTest.cs
  12. 1
      src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj
  13. 2
      src/ProtocolBuffers.Test/TestProtos/UnitTestCSharpOptionsProtoFile.cs
  14. 2
      src/ProtocolBuffers.Test/TestProtos/UnitTestCustomOptionsProtoFile.cs
  15. 2
      src/ProtocolBuffers.Test/TestProtos/UnitTestEmbedOptimizeForProtoFile.cs
  16. 2
      src/ProtocolBuffers.Test/TestProtos/UnitTestEmptyProtoFile.cs
  17. 829
      src/ProtocolBuffers.Test/TestProtos/UnitTestExtrasIssuesProtoFile.cs
  18. 2
      src/ProtocolBuffers.Test/TestProtos/UnitTestGenericServices.cs
  19. 2
      src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSizeProtoFile.cs
  20. 2
      src/ProtocolBuffers.Test/TestProtos/UnitTestGoogleSpeedProtoFile.cs
  21. 2
      src/ProtocolBuffers.Test/TestProtos/UnitTestImportLiteProtoFile.cs
  22. 2
      src/ProtocolBuffers.Test/TestProtos/UnitTestImportProtoFile.cs
  23. 2
      src/ProtocolBuffers.Test/TestProtos/UnitTestMessageSetProtoFile.cs
  24. 2
      src/ProtocolBuffers.Test/TestProtos/UnitTestNoGenericServicesProtoFile.cs
  25. 2
      src/ProtocolBuffers.Test/TestProtos/UnitTestOptimizeForProtoFile.cs
  26. 8
      src/ProtocolBuffers.Test/TestProtos/UnitTestProtoFile.cs
  27. 2
      src/ProtocolBuffers.Test/TestProtos/UnitTestRpcInterop.cs
  28. 2
      src/ProtocolBuffers.Test/TestProtos/UnitTestXmlSerializerTestProtoFile.cs
  29. 2
      src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs
  30. 2
      src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs
  31. 2
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasFullProtoFile.cs
  32. 2
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasLiteProtoFile.cs
  33. 2
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestImportLiteProtoFile.cs
  34. 2
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestImportProtoFile.cs
  35. 2
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteImportNonLiteProtoFile.cs
  36. 8
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteProtoFile.cs
  37. 8
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestProtoFile.cs

@ -99,4 +99,25 @@ message NegativeEnumMessage {
optional NegativeEnum value = 1;
repeated NegativeEnum values = 2;
repeated NegativeEnum packed_values = 3 [packed=true];
}
// Issue 21: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=21
// Decorate fields with [deprecated=true] as [System.Obsolete]
message DeprecatedChild {
}
enum DeprecatedEnum {
one = 1;
}
message DeprecatedFieldsMessage {
optional int32 PrimitiveValue = 1 [deprecated = true];
repeated int32 PrimitiveArray = 2 [deprecated = true];
optional DeprecatedChild MessageValue = 3 [deprecated = true];
repeated DeprecatedChild MessageArray = 4 [deprecated = true];
optional DeprecatedEnum EnumValue = 5 [deprecated = true];
repeated DeprecatedEnum EnumArray = 6 [deprecated = true];
}

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -49,10 +49,11 @@ namespace Google.ProtocolBuffers.ProtoGen
{
writer.WriteLine("private bool has{0};", PropertyName);
writer.WriteLine("private {0} {1}_ = {2};", TypeName, Name, DefaultValue);
AddDeprecatedFlag(writer);
writer.WriteLine("public bool Has{0} {{", PropertyName);
writer.WriteLine(" get {{ return has{0}; }}", PropertyName);
writer.WriteLine("}");
AddClsComplianceCheck(writer);
AddPublicMemberAttributes(writer);
writer.WriteLine("public {0} {1} {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return {0}_; }}", Name);
writer.WriteLine("}");
@ -60,20 +61,22 @@ namespace Google.ProtocolBuffers.ProtoGen
public void GenerateBuilderMembers(TextGenerator writer)
{
AddDeprecatedFlag(writer);
writer.WriteLine("public bool Has{0} {{", PropertyName);
writer.WriteLine(" get {{ return result.has{0}; }}", PropertyName);
writer.WriteLine("}");
AddClsComplianceCheck(writer);
AddPublicMemberAttributes(writer);
writer.WriteLine("public {0} {1} {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return result.{0}; }}", PropertyName);
writer.WriteLine(" set {{ Set{0}(value); }}", PropertyName);
writer.WriteLine("}");
AddClsComplianceCheck(writer);
AddPublicMemberAttributes(writer);
writer.WriteLine("public Builder Set{0}({1} value) {{", PropertyName, TypeName);
writer.WriteLine(" result.has{0} = true;", PropertyName);
writer.WriteLine(" result.{0}_ = value;", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Clear{0}() {{", PropertyName);
writer.WriteLine(" result.has{0} = false;", PropertyName);
writer.WriteLine(" result.{0}_ = {1};", Name, DefaultValue);

@ -251,6 +251,12 @@ namespace Google.ProtocolBuffers.ProtoGen
}
}
protected void AddPublicMemberAttributes(TextGenerator writer)
{
AddDeprecatedFlag(writer);
AddClsComplianceCheck(writer);
}
protected void AddClsComplianceCheck(TextGenerator writer)
{
if (!Descriptor.IsCLSCompliant && Descriptor.File.CSharpOptions.ClsCompliance)
@ -259,6 +265,19 @@ namespace Google.ProtocolBuffers.ProtoGen
}
}
protected bool IsObsolete { get { return Descriptor.Options.Deprecated; } }
/// <summary>
/// Writes [global::System.ObsoleteAttribute()] if the member is obsolete
/// </summary>
protected void AddDeprecatedFlag(TextGenerator writer)
{
if (IsObsolete)
{
writer.WriteLine("[global::System.ObsoleteAttribute()]");
}
}
/// <summary>
/// For encodings with fixed sizes, returns that size in bytes. Otherwise
/// returns -1. TODO(jonskeet): Make this less ugly.

@ -49,9 +49,11 @@ namespace Google.ProtocolBuffers.ProtoGen
{
writer.WriteLine("private bool has{0};", PropertyName);
writer.WriteLine("private {0} {1}_ = {2};", TypeName, Name, DefaultValue);
AddDeprecatedFlag(writer);
writer.WriteLine("public bool Has{0} {{", PropertyName);
writer.WriteLine(" get {{ return has{0}; }}", PropertyName);
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public {0} {1} {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return {0}_; }}", Name);
writer.WriteLine("}");
@ -59,25 +61,30 @@ namespace Google.ProtocolBuffers.ProtoGen
public void GenerateBuilderMembers(TextGenerator writer)
{
AddDeprecatedFlag(writer);
writer.WriteLine("public bool Has{0} {{", PropertyName);
writer.WriteLine(" get {{ return result.has{0}; }}", PropertyName);
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public {0} {1} {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return result.{0}; }}", PropertyName);
writer.WriteLine(" set {{ Set{0}(value); }}", PropertyName);
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Set{0}({1} value) {{", PropertyName, TypeName);
AddNullCheck(writer);
writer.WriteLine(" result.has{0} = true;", PropertyName);
writer.WriteLine(" result.{0}_ = value;", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Set{0}({1}.Builder builderForValue) {{", PropertyName, TypeName);
AddNullCheck(writer, "builderForValue");
writer.WriteLine(" result.has{0} = true;", PropertyName);
writer.WriteLine(" result.{0}_ = builderForValue.Build();", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Merge{0}({1} value) {{", PropertyName, TypeName);
AddNullCheck(writer);
writer.WriteLine(" if (result.has{0} &&", PropertyName);
@ -90,6 +97,7 @@ namespace Google.ProtocolBuffers.ProtoGen
writer.WriteLine(" result.has{0} = true;", PropertyName);
writer.WriteLine(" return this;");
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Clear{0}() {{", PropertyName);
writer.WriteLine(" result.has{0} = false;", PropertyName);
writer.WriteLine(" result.{0}_ = {1};", Name, DefaultValue);

@ -50,10 +50,11 @@ namespace Google.ProtocolBuffers.ProtoGen
{
writer.WriteLine("private bool has{0};", PropertyName);
writer.WriteLine("private {0} {1}_{2};", TypeName, Name, HasDefaultValue ? " = " + DefaultValue : "");
AddDeprecatedFlag(writer);
writer.WriteLine("public bool Has{0} {{", PropertyName);
writer.WriteLine(" get {{ return has{0}; }}", PropertyName);
writer.WriteLine("}");
AddClsComplianceCheck(writer);
AddPublicMemberAttributes(writer);
writer.WriteLine("public {0} {1} {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return {0}_; }}", Name);
writer.WriteLine("}");
@ -61,21 +62,23 @@ namespace Google.ProtocolBuffers.ProtoGen
public void GenerateBuilderMembers(TextGenerator writer)
{
AddDeprecatedFlag(writer);
writer.WriteLine("public bool Has{0} {{", PropertyName);
writer.WriteLine(" get {{ return result.has{0}; }}", PropertyName);
writer.WriteLine("}");
AddClsComplianceCheck(writer);
AddPublicMemberAttributes(writer);
writer.WriteLine("public {0} {1} {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return result.{0}; }}", PropertyName);
writer.WriteLine(" set {{ Set{0}(value); }}", PropertyName);
writer.WriteLine("}");
AddClsComplianceCheck(writer);
AddPublicMemberAttributes(writer);
writer.WriteLine("public Builder Set{0}({1} value) {{", PropertyName, TypeName);
AddNullCheck(writer);
writer.WriteLine(" result.has{0} = true;", PropertyName);
writer.WriteLine(" result.{0}_ = value;", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Clear{0}() {{", PropertyName);
writer.WriteLine(" result.has{0} = false;", PropertyName);
writer.WriteLine(" result.{0}_ = {1};", Name, DefaultValue);

@ -52,15 +52,18 @@ namespace Google.ProtocolBuffers.ProtoGen
writer.WriteLine("private int {0}MemoizedSerializedSize;", Name);
}
writer.WriteLine("private pbc::PopsicleList<{0}> {1}_ = new pbc::PopsicleList<{0}>();", TypeName, Name);
AddDeprecatedFlag(writer);
writer.WriteLine("public scg::IList<{0}> {1}List {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return pbc::Lists.AsReadOnly({0}_); }}", Name);
writer.WriteLine("}");
// TODO(jonskeet): Redundant API calls? Possibly - include for portability though. Maybe create an option.
AddDeprecatedFlag(writer);
writer.WriteLine("public int {0}Count {{", PropertyName);
writer.WriteLine(" get {{ return {0}_.Count; }}", Name);
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public {0} Get{1}(int index) {{", TypeName, PropertyName);
writer.WriteLine(" return {0}_[index];", Name);
writer.WriteLine("}");
@ -70,27 +73,34 @@ namespace Google.ProtocolBuffers.ProtoGen
{
// Note: We can return the original list here, because we make it unmodifiable when we build
// We return it via IPopsicleList so that collection initializers work more pleasantly.
AddDeprecatedFlag(writer);
writer.WriteLine("public pbc::IPopsicleList<{0}> {1}List {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return result.{0}_; }}", Name);
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public int {0}Count {{", PropertyName);
writer.WriteLine(" get {{ return result.{0}Count; }}", PropertyName);
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public {0} Get{1}(int index) {{", TypeName, PropertyName);
writer.WriteLine(" return result.Get{0}(index);", PropertyName);
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Set{0}(int index, {1} value) {{", PropertyName, TypeName);
writer.WriteLine(" result.{0}_[index] = value;", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Add{0}({1} value) {{", PropertyName, TypeName);
writer.WriteLine(" result.{0}_.Add(value);", Name, TypeName);
writer.WriteLine(" return this;");
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public Builder AddRange{0}(scg::IEnumerable<{1}> values) {{", PropertyName, TypeName);
writer.WriteLine(" base.AddRange(values, result.{0}_);", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Clear{0}() {{", PropertyName);
writer.WriteLine(" result.{0}_.Clear();", Name);
writer.WriteLine(" return this;");

@ -48,15 +48,18 @@ namespace Google.ProtocolBuffers.ProtoGen
public void GenerateMembers(TextGenerator writer)
{
writer.WriteLine("private pbc::PopsicleList<{0}> {1}_ = new pbc::PopsicleList<{0}>();", TypeName, Name);
AddDeprecatedFlag(writer);
writer.WriteLine("public scg::IList<{0}> {1}List {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return {0}_; }}", Name);
writer.WriteLine("}");
// TODO(jonskeet): Redundant API calls? Possibly - include for portability though. Maybe create an option.
AddDeprecatedFlag(writer);
writer.WriteLine("public int {0}Count {{", PropertyName);
writer.WriteLine(" get {{ return {0}_.Count; }}", Name);
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public {0} Get{1}(int index) {{", TypeName, PropertyName);
writer.WriteLine(" return {0}_[index];", Name);
writer.WriteLine("}");
@ -66,41 +69,50 @@ namespace Google.ProtocolBuffers.ProtoGen
{
// Note: We can return the original list here, because we make it unmodifiable when we build
// We return it via IPopsicleList so that collection initializers work more pleasantly.
AddDeprecatedFlag(writer);
writer.WriteLine("public pbc::IPopsicleList<{0}> {1}List {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return result.{0}_; }}", Name);
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public int {0}Count {{", PropertyName);
writer.WriteLine(" get {{ return result.{0}Count; }}", PropertyName);
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public {0} Get{1}(int index) {{", TypeName, PropertyName);
writer.WriteLine(" return result.Get{0}(index);", PropertyName);
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Set{0}(int index, {1} value) {{", PropertyName, TypeName);
AddNullCheck(writer);
writer.WriteLine(" result.{0}_[index] = value;", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
// Extra overload for builder (just on messages)
AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Set{0}(int index, {1}.Builder builderForValue) {{", PropertyName, TypeName);
AddNullCheck(writer, "builderForValue");
writer.WriteLine(" result.{0}_[index] = builderForValue.Build();", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Add{0}({1} value) {{", PropertyName, TypeName);
AddNullCheck(writer);
writer.WriteLine(" result.{0}_.Add(value);", Name, TypeName);
writer.WriteLine(" return this;");
writer.WriteLine("}");
// Extra overload for builder (just on messages)
AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Add{0}({1}.Builder builderForValue) {{", PropertyName, TypeName);
AddNullCheck(writer, "builderForValue");
writer.WriteLine(" result.{0}_.Add(builderForValue.Build());", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public Builder AddRange{0}(scg::IEnumerable<{1}> values) {{", PropertyName, TypeName);
writer.WriteLine(" base.AddRange(values, result.{0}_);", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Clear{0}() {{", PropertyName);
writer.WriteLine(" result.{0}_.Clear();", Name);
writer.WriteLine(" return this;");

@ -52,17 +52,18 @@ namespace Google.ProtocolBuffers.ProtoGen
writer.WriteLine("private int {0}MemoizedSerializedSize;", Name);
}
writer.WriteLine("private pbc::PopsicleList<{0}> {1}_ = new pbc::PopsicleList<{0}>();", TypeName, Name);
AddClsComplianceCheck(writer);
AddPublicMemberAttributes(writer);
writer.WriteLine("public scg::IList<{0}> {1}List {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return pbc::Lists.AsReadOnly({0}_); }}", Name);
writer.WriteLine("}");
// TODO(jonskeet): Redundant API calls? Possibly - include for portability though. Maybe create an option.
AddDeprecatedFlag(writer);
writer.WriteLine("public int {0}Count {{", PropertyName);
writer.WriteLine(" get {{ return {0}_.Count; }}", Name);
writer.WriteLine("}");
AddClsComplianceCheck(writer);
AddPublicMemberAttributes(writer);
writer.WriteLine("public {0} Get{1}(int index) {{", TypeName, PropertyName);
writer.WriteLine(" return {0}_[index];", Name);
writer.WriteLine("}");
@ -72,34 +73,36 @@ namespace Google.ProtocolBuffers.ProtoGen
{
// Note: We can return the original list here, because we make it unmodifiable when we build
// We return it via IPopsicleList so that collection initializers work more pleasantly.
AddClsComplianceCheck(writer);
AddPublicMemberAttributes(writer);
writer.WriteLine("public pbc::IPopsicleList<{0}> {1}List {{", TypeName, PropertyName);
writer.WriteLine(" get {{ return result.{0}_; }}", Name);
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public int {0}Count {{", PropertyName);
writer.WriteLine(" get {{ return result.{0}Count; }}", PropertyName);
writer.WriteLine("}");
AddClsComplianceCheck(writer);
AddPublicMemberAttributes(writer);
writer.WriteLine("public {0} Get{1}(int index) {{", TypeName, PropertyName);
writer.WriteLine(" return result.Get{0}(index);", PropertyName);
writer.WriteLine("}");
AddClsComplianceCheck(writer);
AddPublicMemberAttributes(writer);
writer.WriteLine("public Builder Set{0}(int index, {1} value) {{", PropertyName, TypeName);
AddNullCheck(writer);
writer.WriteLine(" result.{0}_[index] = value;", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
AddClsComplianceCheck(writer);
AddPublicMemberAttributes(writer);
writer.WriteLine("public Builder Add{0}({1} value) {{", PropertyName, TypeName);
AddNullCheck(writer);
writer.WriteLine(" result.{0}_.Add(value);", Name, TypeName);
writer.WriteLine(" return this;");
writer.WriteLine("}");
AddClsComplianceCheck(writer);
AddPublicMemberAttributes(writer);
writer.WriteLine("public Builder AddRange{0}(scg::IEnumerable<{1}> values) {{", PropertyName, TypeName);
writer.WriteLine(" base.AddRange(values, result.{0}_);", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
AddDeprecatedFlag(writer);
writer.WriteLine("public Builder Clear{0}() {{", PropertyName);
writer.WriteLine(" result.{0}_.Clear();", Name);
writer.WriteLine(" return this;");

@ -138,8 +138,8 @@ namespace Google.ProtocolBuffers.ProtoGen
private void WriteIntroduction(TextGenerator writer)
{
writer.WriteLine("// Generated by {0}. DO NOT EDIT!", this.GetType().Assembly.FullName);
writer.WriteLine("#pragma warning disable 1591");
writer.WriteLine("// Generated by {0}. DO NOT EDIT!", this.GetType().Assembly.FullName);
writer.WriteLine("#pragma warning disable 1591, 0612");
writer.WriteLine("#region Designer generated code");
writer.WriteLine();

@ -0,0 +1,102 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using NUnit.Framework;
using UnitTest.Issues.TestProtos;
namespace Google.ProtocolBuffers
{
[TestFixture]
public class DeprecatedMemberTest
{
private static void AssertIsDeprecated(ICustomAttributeProvider member)
{
Assert.IsNotNull(member);
Assert.IsTrue(member.IsDefined(typeof(ObsoleteAttribute), false), "Member not obsolete: " + member);
}
[Test]
public void TestDepreatedPrimitiveValue()
{
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("HasPrimitiveValue"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("PrimitiveValue"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("HasPrimitiveValue"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("PrimitiveValue"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("ClearPrimitiveValue"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetPrimitiveValue"));
}
[Test]
public void TestDepreatedPrimitiveArray()
{
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("PrimitiveArrayList"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("PrimitiveArrayCount"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetMethod("GetPrimitiveArray"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("PrimitiveArrayList"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("PrimitiveArrayCount"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("GetPrimitiveArray"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetPrimitiveArray"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("AddPrimitiveArray"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("AddRangePrimitiveArray"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("ClearPrimitiveArray"));
}
[Test]
public void TestDepreatedMessageValue()
{
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("HasMessageValue"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("MessageValue"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("HasMessageValue"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("MessageValue"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("MergeMessageValue"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("ClearMessageValue"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetMessageValue", new[] { typeof(DeprecatedChild) }));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetMessageValue", new[] { typeof(DeprecatedChild.Builder) }));
}
[Test]
public void TestDepreatedMessageArray()
{
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("MessageArrayList"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("MessageArrayCount"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetMethod("GetMessageArray"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("MessageArrayList"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("MessageArrayCount"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("GetMessageArray"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetMessageArray", new[] { typeof(int), typeof(DeprecatedChild) }));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetMessageArray", new[] { typeof(int), typeof(DeprecatedChild.Builder) }));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("AddMessageArray", new[] { typeof(DeprecatedChild) }));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("AddMessageArray", new[] { typeof(DeprecatedChild.Builder) }));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("AddRangeMessageArray"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("ClearMessageArray"));
}
[Test]
public void TestDepreatedEnumValue()
{
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("HasEnumValue"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("EnumValue"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("HasEnumValue"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("EnumValue"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("ClearEnumValue"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetEnumValue"));
}
[Test]
public void TestDepreatedEnumArray()
{
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("EnumArrayList"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("EnumArrayCount"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetMethod("GetEnumArray"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("EnumArrayList"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetProperty("EnumArrayCount"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("GetEnumArray"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetEnumArray"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("AddEnumArray"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("AddRangeEnumArray"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("ClearEnumArray"));
}
}
}

@ -93,6 +93,7 @@
<Compile Include="Compatibility\TextCompatibilityTests.cs" />
<Compile Include="Compatibility\XmlCompatibilityTests.cs" />
<Compile Include="CSharpOptionsTest.cs" />
<Compile Include="DeprecatedMemberTest.cs" />
<Compile Include="DescriptorsTest.cs" />
<Compile Include="Descriptors\MessageDescriptorTest.cs" />
<Compile Include="DynamicMessageTest.cs" />

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@ -28,6 +28,10 @@ namespace UnitTest.Issues.TestProtos {
internal static pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.NumberField, global::UnitTest.Issues.TestProtos.NumberField.Builder> internal__static_unittest_issues_NumberField__FieldAccessorTable;
internal static pbd::MessageDescriptor internal__static_unittest_issues_NegativeEnumMessage__Descriptor;
internal static pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.NegativeEnumMessage, global::UnitTest.Issues.TestProtos.NegativeEnumMessage.Builder> internal__static_unittest_issues_NegativeEnumMessage__FieldAccessorTable;
internal static pbd::MessageDescriptor internal__static_unittest_issues_DeprecatedChild__Descriptor;
internal static pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.DeprecatedChild, global::UnitTest.Issues.TestProtos.DeprecatedChild.Builder> internal__static_unittest_issues_DeprecatedChild__FieldAccessorTable;
internal static pbd::MessageDescriptor internal__static_unittest_issues_DeprecatedFieldsMessage__Descriptor;
internal static pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage, global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage.Builder> internal__static_unittest_issues_DeprecatedFieldsMessage__FieldAccessorTable;
#endregion
#region Descriptor
public static pbd::FileDescriptor Descriptor {
@ -44,10 +48,18 @@ namespace UnitTest.Issues.TestProtos {
"bnVtTWVzc2FnZRIsCgV2YWx1ZRgBIAEoDjIdLnVuaXR0ZXN0X2lzc3Vlcy5O" +
"ZWdhdGl2ZUVudW0SLQoGdmFsdWVzGAIgAygOMh0udW5pdHRlc3RfaXNzdWVz" +
"Lk5lZ2F0aXZlRW51bRI4Cg1wYWNrZWRfdmFsdWVzGAMgAygOMh0udW5pdHRl" +
"c3RfaXNzdWVzLk5lZ2F0aXZlRW51bUICEAEqRwoMTmVnYXRpdmVFbnVtEhYK" +
"CUZpdmVCZWxvdxD7//////////8BEhUKCE1pbnVzT25lEP///////////wES" +
"CAoEWmVybxAAQkBIAcI+OwoaVW5pdFRlc3QuSXNzdWVzLlRlc3RQcm90b3MS" +
"HVVuaXRUZXN0RXh0cmFzSXNzdWVzUHJvdG9GaWxl");
"c3RfaXNzdWVzLk5lZ2F0aXZlRW51bUICEAEiEQoPRGVwcmVjYXRlZENoaWxk" +
"IrkCChdEZXByZWNhdGVkRmllbGRzTWVzc2FnZRIaCg5QcmltaXRpdmVWYWx1" +
"ZRgBIAEoBUICGAESGgoOUHJpbWl0aXZlQXJyYXkYAiADKAVCAhgBEjoKDE1l" +
"c3NhZ2VWYWx1ZRgDIAEoCzIgLnVuaXR0ZXN0X2lzc3Vlcy5EZXByZWNhdGVk" +
"Q2hpbGRCAhgBEjoKDE1lc3NhZ2VBcnJheRgEIAMoCzIgLnVuaXR0ZXN0X2lz" +
"c3Vlcy5EZXByZWNhdGVkQ2hpbGRCAhgBEjYKCUVudW1WYWx1ZRgFIAEoDjIf" +
"LnVuaXR0ZXN0X2lzc3Vlcy5EZXByZWNhdGVkRW51bUICGAESNgoJRW51bUFy" +
"cmF5GAYgAygOMh8udW5pdHRlc3RfaXNzdWVzLkRlcHJlY2F0ZWRFbnVtQgIY" +
"ASpHCgxOZWdhdGl2ZUVudW0SFgoJRml2ZUJlbG93EPv//////////wESFQoI" +
"TWludXNPbmUQ////////////ARIICgRaZXJvEAAqGQoORGVwcmVjYXRlZEVu" +
"dW0SBwoDb25lEAFCQEgBwj47ChpVbml0VGVzdC5Jc3N1ZXMuVGVzdFByb3Rv" +
"cxIdVW5pdFRlc3RFeHRyYXNJc3N1ZXNQcm90b0ZpbGU=");
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
descriptor = root;
internal__static_unittest_issues_A__Descriptor = Descriptor.MessageTypes[0];
@ -70,6 +82,14 @@ namespace UnitTest.Issues.TestProtos {
internal__static_unittest_issues_NegativeEnumMessage__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.NegativeEnumMessage, global::UnitTest.Issues.TestProtos.NegativeEnumMessage.Builder>(internal__static_unittest_issues_NegativeEnumMessage__Descriptor,
new string[] { "Value", "Values", "PackedValues", });
internal__static_unittest_issues_DeprecatedChild__Descriptor = Descriptor.MessageTypes[5];
internal__static_unittest_issues_DeprecatedChild__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.DeprecatedChild, global::UnitTest.Issues.TestProtos.DeprecatedChild.Builder>(internal__static_unittest_issues_DeprecatedChild__Descriptor,
new string[] { });
internal__static_unittest_issues_DeprecatedFieldsMessage__Descriptor = Descriptor.MessageTypes[6];
internal__static_unittest_issues_DeprecatedFieldsMessage__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage, global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage.Builder>(internal__static_unittest_issues_DeprecatedFieldsMessage__Descriptor,
new string[] { "PrimitiveValue", "PrimitiveArray", "MessageValue", "MessageArray", "EnumValue", "EnumArray", });
pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
RegisterAllExtensions(registry);
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry);
@ -92,6 +112,12 @@ namespace UnitTest.Issues.TestProtos {
Zero = 0,
}
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public enum DeprecatedEnum {
one = 1,
}
#endregion
#region Messages
@ -1443,6 +1469,799 @@ namespace UnitTest.Issues.TestProtos {
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class DeprecatedChild : pb::GeneratedMessage<DeprecatedChild, DeprecatedChild.Builder> {
private static readonly DeprecatedChild defaultInstance = new Builder().BuildPartial();
private static readonly string[] _deprecatedChildFieldNames = new string[] { };
private static readonly uint[] _deprecatedChildFieldTags = new uint[] { };
public static DeprecatedChild DefaultInstance {
get { return defaultInstance; }
}
public override DeprecatedChild DefaultInstanceForType {
get { return defaultInstance; }
}
protected override DeprecatedChild ThisMessage {
get { return this; }
}
public static pbd::MessageDescriptor Descriptor {
get { return global::UnitTest.Issues.TestProtos.UnitTestExtrasIssuesProtoFile.internal__static_unittest_issues_DeprecatedChild__Descriptor; }
}
protected override pb::FieldAccess.FieldAccessorTable<DeprecatedChild, DeprecatedChild.Builder> InternalFieldAccessors {
get { return global::UnitTest.Issues.TestProtos.UnitTestExtrasIssuesProtoFile.internal__static_unittest_issues_DeprecatedChild__FieldAccessorTable; }
}
public override bool IsInitialized {
get {
return true;
}
}
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
string[] field_names = _deprecatedChildFieldNames;
UnknownFields.WriteTo(output);
}
private int memoizedSerializedSize = -1;
public override int SerializedSize {
get {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
}
public static DeprecatedChild ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static DeprecatedChild ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
}
public static DeprecatedChild ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static DeprecatedChild ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
}
public static DeprecatedChild ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static DeprecatedChild ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
public static DeprecatedChild ParseDelimitedFrom(global::System.IO.Stream input) {
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
}
public static DeprecatedChild ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
}
public static DeprecatedChild ParseFrom(pb::ICodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static DeprecatedChild ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(DeprecatedChild prototype) {
return (Builder) new Builder().MergeFrom(prototype);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class Builder : pb::GeneratedBuilder<DeprecatedChild, Builder> {
protected override Builder ThisBuilder {
get { return this; }
}
public Builder() {}
DeprecatedChild result = new DeprecatedChild();
protected override DeprecatedChild MessageBeingBuilt {
get { return result; }
}
public override Builder Clear() {
result = new DeprecatedChild();
return this;
}
public override Builder Clone() {
return new Builder().MergeFrom(result);
}
public override pbd::MessageDescriptor DescriptorForType {
get { return global::UnitTest.Issues.TestProtos.DeprecatedChild.Descriptor; }
}
public override DeprecatedChild DefaultInstanceForType {
get { return global::UnitTest.Issues.TestProtos.DeprecatedChild.DefaultInstance; }
}
public override DeprecatedChild BuildPartial() {
if (result == null) {
throw new global::System.InvalidOperationException("build() has already been called on this Builder");
}
DeprecatedChild returnMe = result;
result = null;
return returnMe;
}
public override Builder MergeFrom(pb::IMessage other) {
if (other is DeprecatedChild) {
return MergeFrom((DeprecatedChild) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override Builder MergeFrom(DeprecatedChild other) {
if (other == global::UnitTest.Issues.TestProtos.DeprecatedChild.DefaultInstance) return this;
this.MergeUnknownFields(other.UnknownFields);
return this;
}
public override Builder MergeFrom(pb::ICodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty);
}
public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
uint tag;
string field_name;
while (input.ReadTag(out tag, out field_name)) {
if(tag == 0 && field_name != null) {
int field_ordinal = global::System.Array.BinarySearch(_deprecatedChildFieldNames, field_name, global::System.StringComparer.Ordinal);
if(field_ordinal >= 0)
tag = _deprecatedChildFieldTags[field_ordinal];
else {
if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
}
ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
continue;
}
}
switch (tag) {
case 0: {
throw pb::InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
if (unknownFields != null) {
this.UnknownFields = unknownFields.Build();
}
return this;
}
if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
}
ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
break;
}
}
}
if (unknownFields != null) {
this.UnknownFields = unknownFields.Build();
}
return this;
}
}
static DeprecatedChild() {
object.ReferenceEquals(global::UnitTest.Issues.TestProtos.UnitTestExtrasIssuesProtoFile.Descriptor, null);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class DeprecatedFieldsMessage : pb::GeneratedMessage<DeprecatedFieldsMessage, DeprecatedFieldsMessage.Builder> {
private static readonly DeprecatedFieldsMessage defaultInstance = new Builder().BuildPartial();
private static readonly string[] _deprecatedFieldsMessageFieldNames = new string[] { "EnumArray", "EnumValue", "MessageArray", "MessageValue", "PrimitiveArray", "PrimitiveValue" };
private static readonly uint[] _deprecatedFieldsMessageFieldTags = new uint[] { 48, 40, 34, 26, 16, 8 };
public static DeprecatedFieldsMessage DefaultInstance {
get { return defaultInstance; }
}
public override DeprecatedFieldsMessage DefaultInstanceForType {
get { return defaultInstance; }
}
protected override DeprecatedFieldsMessage ThisMessage {
get { return this; }
}
public static pbd::MessageDescriptor Descriptor {
get { return global::UnitTest.Issues.TestProtos.UnitTestExtrasIssuesProtoFile.internal__static_unittest_issues_DeprecatedFieldsMessage__Descriptor; }
}
protected override pb::FieldAccess.FieldAccessorTable<DeprecatedFieldsMessage, DeprecatedFieldsMessage.Builder> InternalFieldAccessors {
get { return global::UnitTest.Issues.TestProtos.UnitTestExtrasIssuesProtoFile.internal__static_unittest_issues_DeprecatedFieldsMessage__FieldAccessorTable; }
}
public const int PrimitiveValueFieldNumber = 1;
private bool hasPrimitiveValue;
private int primitiveValue_;
[global::System.ObsoleteAttribute()]
public bool HasPrimitiveValue {
get { return hasPrimitiveValue; }
}
[global::System.ObsoleteAttribute()]
public int PrimitiveValue {
get { return primitiveValue_; }
}
public const int PrimitiveArrayFieldNumber = 2;
private pbc::PopsicleList<int> primitiveArray_ = new pbc::PopsicleList<int>();
[global::System.ObsoleteAttribute()]
public scg::IList<int> PrimitiveArrayList {
get { return pbc::Lists.AsReadOnly(primitiveArray_); }
}
[global::System.ObsoleteAttribute()]
public int PrimitiveArrayCount {
get { return primitiveArray_.Count; }
}
[global::System.ObsoleteAttribute()]
public int GetPrimitiveArray(int index) {
return primitiveArray_[index];
}
public const int MessageValueFieldNumber = 3;
private bool hasMessageValue;
private global::UnitTest.Issues.TestProtos.DeprecatedChild messageValue_ = global::UnitTest.Issues.TestProtos.DeprecatedChild.DefaultInstance;
[global::System.ObsoleteAttribute()]
public bool HasMessageValue {
get { return hasMessageValue; }
}
[global::System.ObsoleteAttribute()]
public global::UnitTest.Issues.TestProtos.DeprecatedChild MessageValue {
get { return messageValue_; }
}
public const int MessageArrayFieldNumber = 4;
private pbc::PopsicleList<global::UnitTest.Issues.TestProtos.DeprecatedChild> messageArray_ = new pbc::PopsicleList<global::UnitTest.Issues.TestProtos.DeprecatedChild>();
[global::System.ObsoleteAttribute()]
public scg::IList<global::UnitTest.Issues.TestProtos.DeprecatedChild> MessageArrayList {
get { return messageArray_; }
}
[global::System.ObsoleteAttribute()]
public int MessageArrayCount {
get { return messageArray_.Count; }
}
[global::System.ObsoleteAttribute()]
public global::UnitTest.Issues.TestProtos.DeprecatedChild GetMessageArray(int index) {
return messageArray_[index];
}
public const int EnumValueFieldNumber = 5;
private bool hasEnumValue;
private global::UnitTest.Issues.TestProtos.DeprecatedEnum enumValue_ = global::UnitTest.Issues.TestProtos.DeprecatedEnum.one;
[global::System.ObsoleteAttribute()]
public bool HasEnumValue {
get { return hasEnumValue; }
}
[global::System.ObsoleteAttribute()]
public global::UnitTest.Issues.TestProtos.DeprecatedEnum EnumValue {
get { return enumValue_; }
}
public const int EnumArrayFieldNumber = 6;
private pbc::PopsicleList<global::UnitTest.Issues.TestProtos.DeprecatedEnum> enumArray_ = new pbc::PopsicleList<global::UnitTest.Issues.TestProtos.DeprecatedEnum>();
[global::System.ObsoleteAttribute()]
public scg::IList<global::UnitTest.Issues.TestProtos.DeprecatedEnum> EnumArrayList {
get { return pbc::Lists.AsReadOnly(enumArray_); }
}
[global::System.ObsoleteAttribute()]
public int EnumArrayCount {
get { return enumArray_.Count; }
}
[global::System.ObsoleteAttribute()]
public global::UnitTest.Issues.TestProtos.DeprecatedEnum GetEnumArray(int index) {
return enumArray_[index];
}
public override bool IsInitialized {
get {
return true;
}
}
public override void WriteTo(pb::ICodedOutputStream output) {
int size = SerializedSize;
string[] field_names = _deprecatedFieldsMessageFieldNames;
if (hasPrimitiveValue) {
output.WriteInt32(1, field_names[5], PrimitiveValue);
}
if (primitiveArray_.Count > 0) {
output.WriteInt32Array(2, field_names[4], primitiveArray_);
}
if (hasMessageValue) {
output.WriteMessage(3, field_names[3], MessageValue);
}
if (messageArray_.Count > 0) {
output.WriteMessageArray(4, field_names[2], messageArray_);
}
if (hasEnumValue) {
output.WriteEnum(5, field_names[1], (int) EnumValue, EnumValue);
}
if (enumArray_.Count > 0) {
output.WriteEnumArray(6, field_names[0], enumArray_);
}
UnknownFields.WriteTo(output);
}
private int memoizedSerializedSize = -1;
public override int SerializedSize {
get {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasPrimitiveValue) {
size += pb::CodedOutputStream.ComputeInt32Size(1, PrimitiveValue);
}
{
int dataSize = 0;
foreach (int element in PrimitiveArrayList) {
dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
}
size += dataSize;
size += 1 * primitiveArray_.Count;
}
if (hasMessageValue) {
size += pb::CodedOutputStream.ComputeMessageSize(3, MessageValue);
}
foreach (global::UnitTest.Issues.TestProtos.DeprecatedChild element in MessageArrayList) {
size += pb::CodedOutputStream.ComputeMessageSize(4, element);
}
if (hasEnumValue) {
size += pb::CodedOutputStream.ComputeEnumSize(5, (int) EnumValue);
}
{
int dataSize = 0;
if (enumArray_.Count > 0) {
foreach (global::UnitTest.Issues.TestProtos.DeprecatedEnum element in enumArray_) {
dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
}
size += dataSize;
size += 1 * enumArray_.Count;
}
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
}
public static DeprecatedFieldsMessage ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static DeprecatedFieldsMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
}
public static DeprecatedFieldsMessage ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static DeprecatedFieldsMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
}
public static DeprecatedFieldsMessage ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static DeprecatedFieldsMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
public static DeprecatedFieldsMessage ParseDelimitedFrom(global::System.IO.Stream input) {
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
}
public static DeprecatedFieldsMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
}
public static DeprecatedFieldsMessage ParseFrom(pb::ICodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static DeprecatedFieldsMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(DeprecatedFieldsMessage prototype) {
return (Builder) new Builder().MergeFrom(prototype);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class Builder : pb::GeneratedBuilder<DeprecatedFieldsMessage, Builder> {
protected override Builder ThisBuilder {
get { return this; }
}
public Builder() {}
DeprecatedFieldsMessage result = new DeprecatedFieldsMessage();
protected override DeprecatedFieldsMessage MessageBeingBuilt {
get { return result; }
}
public override Builder Clear() {
result = new DeprecatedFieldsMessage();
return this;
}
public override Builder Clone() {
return new Builder().MergeFrom(result);
}
public override pbd::MessageDescriptor DescriptorForType {
get { return global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage.Descriptor; }
}
public override DeprecatedFieldsMessage DefaultInstanceForType {
get { return global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage.DefaultInstance; }
}
public override DeprecatedFieldsMessage BuildPartial() {
if (result == null) {
throw new global::System.InvalidOperationException("build() has already been called on this Builder");
}
result.primitiveArray_.MakeReadOnly();
result.messageArray_.MakeReadOnly();
result.enumArray_.MakeReadOnly();
DeprecatedFieldsMessage returnMe = result;
result = null;
return returnMe;
}
public override Builder MergeFrom(pb::IMessage other) {
if (other is DeprecatedFieldsMessage) {
return MergeFrom((DeprecatedFieldsMessage) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override Builder MergeFrom(DeprecatedFieldsMessage other) {
if (other == global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage.DefaultInstance) return this;
if (other.HasPrimitiveValue) {
PrimitiveValue = other.PrimitiveValue;
}
if (other.primitiveArray_.Count != 0) {
base.AddRange(other.primitiveArray_, result.primitiveArray_);
}
if (other.HasMessageValue) {
MergeMessageValue(other.MessageValue);
}
if (other.messageArray_.Count != 0) {
base.AddRange(other.messageArray_, result.messageArray_);
}
if (other.HasEnumValue) {
EnumValue = other.EnumValue;
}
if (other.enumArray_.Count != 0) {
base.AddRange(other.enumArray_, result.enumArray_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
}
public override Builder MergeFrom(pb::ICodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty);
}
public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
uint tag;
string field_name;
while (input.ReadTag(out tag, out field_name)) {
if(tag == 0 && field_name != null) {
int field_ordinal = global::System.Array.BinarySearch(_deprecatedFieldsMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
if(field_ordinal >= 0)
tag = _deprecatedFieldsMessageFieldTags[field_ordinal];
else {
if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
}
ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
continue;
}
}
switch (tag) {
case 0: {
throw pb::InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
if (unknownFields != null) {
this.UnknownFields = unknownFields.Build();
}
return this;
}
if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
}
ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
break;
}
case 8: {
result.hasPrimitiveValue = input.ReadInt32(ref result.primitiveValue_);
break;
}
case 18:
case 16: {
input.ReadInt32Array(tag, field_name, result.primitiveArray_);
break;
}
case 26: {
global::UnitTest.Issues.TestProtos.DeprecatedChild.Builder subBuilder = global::UnitTest.Issues.TestProtos.DeprecatedChild.CreateBuilder();
if (result.hasMessageValue) {
subBuilder.MergeFrom(MessageValue);
}
input.ReadMessage(subBuilder, extensionRegistry);
MessageValue = subBuilder.BuildPartial();
break;
}
case 34: {
input.ReadMessageArray(tag, field_name, result.messageArray_, global::UnitTest.Issues.TestProtos.DeprecatedChild.DefaultInstance, extensionRegistry);
break;
}
case 40: {
object unknown;
if(input.ReadEnum(ref result.enumValue_, out unknown)) {
result.hasEnumValue = true;
} else if(unknown is int) {
if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
}
unknownFields.MergeVarintField(5, (ulong)(int)unknown);
}
break;
}
case 50:
case 48: {
scg::ICollection<object> unknownItems;
input.ReadEnumArray<global::UnitTest.Issues.TestProtos.DeprecatedEnum>(tag, field_name, result.enumArray_, out unknownItems);
if (unknownItems != null) {
if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
}
foreach (object rawValue in unknownItems)
if (rawValue is int)
unknownFields.MergeVarintField(6, (ulong)(int)rawValue);
}
break;
}
}
}
if (unknownFields != null) {
this.UnknownFields = unknownFields.Build();
}
return this;
}
[global::System.ObsoleteAttribute()]
public bool HasPrimitiveValue {
get { return result.hasPrimitiveValue; }
}
[global::System.ObsoleteAttribute()]
public int PrimitiveValue {
get { return result.PrimitiveValue; }
set { SetPrimitiveValue(value); }
}
[global::System.ObsoleteAttribute()]
public Builder SetPrimitiveValue(int value) {
result.hasPrimitiveValue = true;
result.primitiveValue_ = value;
return this;
}
[global::System.ObsoleteAttribute()]
public Builder ClearPrimitiveValue() {
result.hasPrimitiveValue = false;
result.primitiveValue_ = 0;
return this;
}
[global::System.ObsoleteAttribute()]
public pbc::IPopsicleList<int> PrimitiveArrayList {
get { return result.primitiveArray_; }
}
[global::System.ObsoleteAttribute()]
public int PrimitiveArrayCount {
get { return result.PrimitiveArrayCount; }
}
[global::System.ObsoleteAttribute()]
public int GetPrimitiveArray(int index) {
return result.GetPrimitiveArray(index);
}
[global::System.ObsoleteAttribute()]
public Builder SetPrimitiveArray(int index, int value) {
result.primitiveArray_[index] = value;
return this;
}
[global::System.ObsoleteAttribute()]
public Builder AddPrimitiveArray(int value) {
result.primitiveArray_.Add(value);
return this;
}
[global::System.ObsoleteAttribute()]
public Builder AddRangePrimitiveArray(scg::IEnumerable<int> values) {
base.AddRange(values, result.primitiveArray_);
return this;
}
[global::System.ObsoleteAttribute()]
public Builder ClearPrimitiveArray() {
result.primitiveArray_.Clear();
return this;
}
[global::System.ObsoleteAttribute()]
public bool HasMessageValue {
get { return result.hasMessageValue; }
}
[global::System.ObsoleteAttribute()]
public global::UnitTest.Issues.TestProtos.DeprecatedChild MessageValue {
get { return result.MessageValue; }
set { SetMessageValue(value); }
}
[global::System.ObsoleteAttribute()]
public Builder SetMessageValue(global::UnitTest.Issues.TestProtos.DeprecatedChild value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
result.hasMessageValue = true;
result.messageValue_ = value;
return this;
}
[global::System.ObsoleteAttribute()]
public Builder SetMessageValue(global::UnitTest.Issues.TestProtos.DeprecatedChild.Builder builderForValue) {
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
result.hasMessageValue = true;
result.messageValue_ = builderForValue.Build();
return this;
}
[global::System.ObsoleteAttribute()]
public Builder MergeMessageValue(global::UnitTest.Issues.TestProtos.DeprecatedChild value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
if (result.hasMessageValue &&
result.messageValue_ != global::UnitTest.Issues.TestProtos.DeprecatedChild.DefaultInstance) {
result.messageValue_ = global::UnitTest.Issues.TestProtos.DeprecatedChild.CreateBuilder(result.messageValue_).MergeFrom(value).BuildPartial();
} else {
result.messageValue_ = value;
}
result.hasMessageValue = true;
return this;
}
[global::System.ObsoleteAttribute()]
public Builder ClearMessageValue() {
result.hasMessageValue = false;
result.messageValue_ = global::UnitTest.Issues.TestProtos.DeprecatedChild.DefaultInstance;
return this;
}
[global::System.ObsoleteAttribute()]
public pbc::IPopsicleList<global::UnitTest.Issues.TestProtos.DeprecatedChild> MessageArrayList {
get { return result.messageArray_; }
}
[global::System.ObsoleteAttribute()]
public int MessageArrayCount {
get { return result.MessageArrayCount; }
}
[global::System.ObsoleteAttribute()]
public global::UnitTest.Issues.TestProtos.DeprecatedChild GetMessageArray(int index) {
return result.GetMessageArray(index);
}
[global::System.ObsoleteAttribute()]
public Builder SetMessageArray(int index, global::UnitTest.Issues.TestProtos.DeprecatedChild value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
result.messageArray_[index] = value;
return this;
}
[global::System.ObsoleteAttribute()]
public Builder SetMessageArray(int index, global::UnitTest.Issues.TestProtos.DeprecatedChild.Builder builderForValue) {
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
result.messageArray_[index] = builderForValue.Build();
return this;
}
[global::System.ObsoleteAttribute()]
public Builder AddMessageArray(global::UnitTest.Issues.TestProtos.DeprecatedChild value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
result.messageArray_.Add(value);
return this;
}
[global::System.ObsoleteAttribute()]
public Builder AddMessageArray(global::UnitTest.Issues.TestProtos.DeprecatedChild.Builder builderForValue) {
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
result.messageArray_.Add(builderForValue.Build());
return this;
}
[global::System.ObsoleteAttribute()]
public Builder AddRangeMessageArray(scg::IEnumerable<global::UnitTest.Issues.TestProtos.DeprecatedChild> values) {
base.AddRange(values, result.messageArray_);
return this;
}
[global::System.ObsoleteAttribute()]
public Builder ClearMessageArray() {
result.messageArray_.Clear();
return this;
}
[global::System.ObsoleteAttribute()]
public bool HasEnumValue {
get { return result.hasEnumValue; }
}
[global::System.ObsoleteAttribute()]
public global::UnitTest.Issues.TestProtos.DeprecatedEnum EnumValue {
get { return result.EnumValue; }
set { SetEnumValue(value); }
}
[global::System.ObsoleteAttribute()]
public Builder SetEnumValue(global::UnitTest.Issues.TestProtos.DeprecatedEnum value) {
result.hasEnumValue = true;
result.enumValue_ = value;
return this;
}
[global::System.ObsoleteAttribute()]
public Builder ClearEnumValue() {
result.hasEnumValue = false;
result.enumValue_ = global::UnitTest.Issues.TestProtos.DeprecatedEnum.one;
return this;
}
[global::System.ObsoleteAttribute()]
public pbc::IPopsicleList<global::UnitTest.Issues.TestProtos.DeprecatedEnum> EnumArrayList {
get { return result.enumArray_; }
}
[global::System.ObsoleteAttribute()]
public int EnumArrayCount {
get { return result.EnumArrayCount; }
}
[global::System.ObsoleteAttribute()]
public global::UnitTest.Issues.TestProtos.DeprecatedEnum GetEnumArray(int index) {
return result.GetEnumArray(index);
}
[global::System.ObsoleteAttribute()]
public Builder SetEnumArray(int index, global::UnitTest.Issues.TestProtos.DeprecatedEnum value) {
result.enumArray_[index] = value;
return this;
}
[global::System.ObsoleteAttribute()]
public Builder AddEnumArray(global::UnitTest.Issues.TestProtos.DeprecatedEnum value) {
result.enumArray_.Add(value);
return this;
}
[global::System.ObsoleteAttribute()]
public Builder AddRangeEnumArray(scg::IEnumerable<global::UnitTest.Issues.TestProtos.DeprecatedEnum> values) {
base.AddRange(values, result.enumArray_);
return this;
}
[global::System.ObsoleteAttribute()]
public Builder ClearEnumArray() {
result.enumArray_.Clear();
return this;
}
}
static DeprecatedFieldsMessage() {
object.ReferenceEquals(global::UnitTest.Issues.TestProtos.UnitTestExtrasIssuesProtoFile.Descriptor, null);
}
}
#endregion
}

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@ -5522,9 +5522,11 @@ namespace Google.ProtocolBuffers.TestProtos {
public const int DeprecatedInt32FieldNumber = 1;
private bool hasDeprecatedInt32;
private int deprecatedInt32_;
[global::System.ObsoleteAttribute()]
public bool HasDeprecatedInt32 {
get { return hasDeprecatedInt32; }
}
[global::System.ObsoleteAttribute()]
public int DeprecatedInt32 {
get { return deprecatedInt32_; }
}
@ -5708,18 +5710,22 @@ namespace Google.ProtocolBuffers.TestProtos {
}
[global::System.ObsoleteAttribute()]
public bool HasDeprecatedInt32 {
get { return result.hasDeprecatedInt32; }
}
[global::System.ObsoleteAttribute()]
public int DeprecatedInt32 {
get { return result.DeprecatedInt32; }
set { SetDeprecatedInt32(value); }
}
[global::System.ObsoleteAttribute()]
public Builder SetDeprecatedInt32(int value) {
result.hasDeprecatedInt32 = true;
result.deprecatedInt32_ = value;
return this;
}
[global::System.ObsoleteAttribute()]
public Builder ClearDeprecatedInt32() {
result.hasDeprecatedInt32 = false;
result.deprecatedInt32_ = 0;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@ -9522,9 +9522,11 @@ namespace Google.ProtocolBuffers.TestProtos {
public const int DeprecatedFieldFieldNumber = 1;
private bool hasDeprecatedField;
private int deprecatedField_;
[global::System.ObsoleteAttribute()]
public bool HasDeprecatedField {
get { return hasDeprecatedField; }
}
[global::System.ObsoleteAttribute()]
public int DeprecatedField {
get { return deprecatedField_; }
}
@ -9707,18 +9709,22 @@ namespace Google.ProtocolBuffers.TestProtos {
}
[global::System.ObsoleteAttribute()]
public bool HasDeprecatedField {
get { return result.hasDeprecatedField; }
}
[global::System.ObsoleteAttribute()]
public int DeprecatedField {
get { return result.DeprecatedField; }
set { SetDeprecatedField(value); }
}
[global::System.ObsoleteAttribute()]
public Builder SetDeprecatedField(int value) {
result.hasDeprecatedField = true;
result.deprecatedField_ = value;
return this;
}
[global::System.ObsoleteAttribute()]
public Builder ClearDeprecatedField() {
result.hasDeprecatedField = false;
result.deprecatedField_ = 0;

@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
#pragma warning disable 1591
#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@ -5522,9 +5522,11 @@ namespace Google.ProtocolBuffers.TestProtos {
public const int DeprecatedInt32FieldNumber = 1;
private bool hasDeprecatedInt32;
private int deprecatedInt32_;
[global::System.ObsoleteAttribute()]
public bool HasDeprecatedInt32 {
get { return hasDeprecatedInt32; }
}
[global::System.ObsoleteAttribute()]
public int DeprecatedInt32 {
get { return deprecatedInt32_; }
}
@ -5708,18 +5710,22 @@ namespace Google.ProtocolBuffers.TestProtos {
}
[global::System.ObsoleteAttribute()]
public bool HasDeprecatedInt32 {
get { return result.hasDeprecatedInt32; }
}
[global::System.ObsoleteAttribute()]
public int DeprecatedInt32 {
get { return result.DeprecatedInt32; }
set { SetDeprecatedInt32(value); }
}
[global::System.ObsoleteAttribute()]
public Builder SetDeprecatedInt32(int value) {
result.hasDeprecatedInt32 = true;
result.deprecatedInt32_ = value;
return this;
}
[global::System.ObsoleteAttribute()]
public Builder ClearDeprecatedInt32() {
result.hasDeprecatedInt32 = false;
result.deprecatedInt32_ = 0;

Loading…
Cancel
Save