UnittestIssues.cs 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: unittest_issues.proto
  3. #pragma warning disable 1591, 0612, 3021
  4. #region Designer generated code
  5. using pb = global::Google.Protobuf;
  6. using pbc = global::Google.Protobuf.Collections;
  7. using pbd = global::Google.Protobuf.Descriptors;
  8. using scg = global::System.Collections.Generic;
  9. namespace UnitTest.Issues.TestProtos {
  10. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  11. public static partial class UnittestIssues {
  12. #region Static variables
  13. internal static pb::FieldAccess.FieldAccessorTable internal__static_unittest_issues_Issue307__FieldAccessorTable;
  14. internal static pb::FieldAccess.FieldAccessorTable internal__static_unittest_issues_Issue307_NestedOnce__FieldAccessorTable;
  15. internal static pb::FieldAccess.FieldAccessorTable internal__static_unittest_issues_Issue307_NestedOnce_NestedTwice__FieldAccessorTable;
  16. internal static pb::FieldAccess.FieldAccessorTable internal__static_unittest_issues_NegativeEnumMessage__FieldAccessorTable;
  17. internal static pb::FieldAccess.FieldAccessorTable internal__static_unittest_issues_DeprecatedChild__FieldAccessorTable;
  18. internal static pb::FieldAccess.FieldAccessorTable internal__static_unittest_issues_DeprecatedFieldsMessage__FieldAccessorTable;
  19. internal static pb::FieldAccess.FieldAccessorTable internal__static_unittest_issues_ItemField__FieldAccessorTable;
  20. #endregion
  21. #region Descriptor
  22. public static pbd::FileDescriptor Descriptor {
  23. get { return descriptor; }
  24. }
  25. private static pbd::FileDescriptor descriptor;
  26. static UnittestIssues() {
  27. byte[] descriptorData = global::System.Convert.FromBase64String(
  28. string.Concat(
  29. "ChV1bml0dGVzdF9pc3N1ZXMucHJvdG8SD3VuaXR0ZXN0X2lzc3VlcyInCghJ",
  30. "c3N1ZTMwNxobCgpOZXN0ZWRPbmNlGg0KC05lc3RlZFR3aWNlIrABChNOZWdh",
  31. "dGl2ZUVudW1NZXNzYWdlEiwKBXZhbHVlGAEgASgOMh0udW5pdHRlc3RfaXNz",
  32. "dWVzLk5lZ2F0aXZlRW51bRIxCgZ2YWx1ZXMYAiADKA4yHS51bml0dGVzdF9p",
  33. "c3N1ZXMuTmVnYXRpdmVFbnVtQgIQABI4Cg1wYWNrZWRfdmFsdWVzGAMgAygO",
  34. "Mh0udW5pdHRlc3RfaXNzdWVzLk5lZ2F0aXZlRW51bUICEAEiEQoPRGVwcmVj",
  35. "YXRlZENoaWxkIrkCChdEZXByZWNhdGVkRmllbGRzTWVzc2FnZRIaCg5Qcmlt",
  36. "aXRpdmVWYWx1ZRgBIAEoBUICGAESGgoOUHJpbWl0aXZlQXJyYXkYAiADKAVC",
  37. "AhgBEjoKDE1lc3NhZ2VWYWx1ZRgDIAEoCzIgLnVuaXR0ZXN0X2lzc3Vlcy5E",
  38. "ZXByZWNhdGVkQ2hpbGRCAhgBEjoKDE1lc3NhZ2VBcnJheRgEIAMoCzIgLnVu",
  39. "aXR0ZXN0X2lzc3Vlcy5EZXByZWNhdGVkQ2hpbGRCAhgBEjYKCUVudW1WYWx1",
  40. "ZRgFIAEoDjIfLnVuaXR0ZXN0X2lzc3Vlcy5EZXByZWNhdGVkRW51bUICGAES",
  41. "NgoJRW51bUFycmF5GAYgAygOMh8udW5pdHRlc3RfaXNzdWVzLkRlcHJlY2F0",
  42. "ZWRFbnVtQgIYASIZCglJdGVtRmllbGQSDAoEaXRlbRgBIAEoBSpVCgxOZWdh",
  43. "dGl2ZUVudW0SFgoSTkVHQVRJVkVfRU5VTV9aRVJPEAASFgoJRml2ZUJlbG93",
  44. "EPv//////////wESFQoITWludXNPbmUQ////////////ASouCg5EZXByZWNh",
  45. "dGVkRW51bRITCg9ERVBSRUNBVEVEX1pFUk8QABIHCgNvbmUQAUIfSAGqAhpV",
  46. "bml0VGVzdC5Jc3N1ZXMuVGVzdFByb3Rvc2IGcHJvdG8z"));
  47. descriptor = pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
  48. new pbd::FileDescriptor[] {
  49. });
  50. internal__static_unittest_issues_Issue307__FieldAccessorTable =
  51. new pb::FieldAccess.FieldAccessorTable(typeof(global::UnitTest.Issues.TestProtos.Issue307), descriptor.MessageTypes[0],
  52. new string[] { }, new string[] { });
  53. internal__static_unittest_issues_Issue307_NestedOnce__FieldAccessorTable =
  54. new pb::FieldAccess.FieldAccessorTable(typeof(global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce), descriptor.MessageTypes[0].NestedTypes[0],
  55. new string[] { }, new string[] { });
  56. internal__static_unittest_issues_Issue307_NestedOnce_NestedTwice__FieldAccessorTable =
  57. new pb::FieldAccess.FieldAccessorTable(typeof(global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Types.NestedTwice), descriptor.MessageTypes[0].NestedTypes[0].NestedTypes[0],
  58. new string[] { }, new string[] { });
  59. internal__static_unittest_issues_NegativeEnumMessage__FieldAccessorTable =
  60. new pb::FieldAccess.FieldAccessorTable(typeof(global::UnitTest.Issues.TestProtos.NegativeEnumMessage), descriptor.MessageTypes[1],
  61. new string[] { "Value", "Values", "PackedValues", }, new string[] { });
  62. internal__static_unittest_issues_DeprecatedChild__FieldAccessorTable =
  63. new pb::FieldAccess.FieldAccessorTable(typeof(global::UnitTest.Issues.TestProtos.DeprecatedChild), descriptor.MessageTypes[2],
  64. new string[] { }, new string[] { });
  65. internal__static_unittest_issues_DeprecatedFieldsMessage__FieldAccessorTable =
  66. new pb::FieldAccess.FieldAccessorTable(typeof(global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage), descriptor.MessageTypes[3],
  67. new string[] { "PrimitiveValue", "PrimitiveArray", "MessageValue", "MessageArray", "EnumValue", "EnumArray", }, new string[] { });
  68. internal__static_unittest_issues_ItemField__FieldAccessorTable =
  69. new pb::FieldAccess.FieldAccessorTable(typeof(global::UnitTest.Issues.TestProtos.ItemField), descriptor.MessageTypes[4],
  70. new string[] { "Item", }, new string[] { });
  71. }
  72. #endregion
  73. }
  74. #region Enums
  75. public enum NegativeEnum {
  76. NEGATIVE_ENUM_ZERO = 0,
  77. FiveBelow = -5,
  78. MinusOne = -1,
  79. }
  80. public enum DeprecatedEnum {
  81. DEPRECATED_ZERO = 0,
  82. one = 1,
  83. }
  84. #endregion
  85. #region Messages
  86. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  87. public sealed partial class Issue307 : pb::IMessage<Issue307> {
  88. private static readonly pb::MessageParser<Issue307> _parser = new pb::MessageParser<Issue307>(() => new Issue307());
  89. public static pb::MessageParser<Issue307> Parser { get { return _parser; } }
  90. private static readonly string[] _fieldNames = new string[] { };
  91. private static readonly uint[] _fieldTags = new uint[] { };
  92. public static pbd::MessageDescriptor Descriptor {
  93. get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[0]; }
  94. }
  95. public pb::FieldAccess.FieldAccessorTable Fields {
  96. get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_Issue307__FieldAccessorTable; }
  97. }
  98. private bool _frozen = false;
  99. public bool IsFrozen { get { return _frozen; } }
  100. public Issue307() {
  101. OnConstruction();
  102. }
  103. partial void OnConstruction();
  104. public Issue307(Issue307 other) : this() {
  105. }
  106. public Issue307 Clone() {
  107. return new Issue307(this);
  108. }
  109. public void Freeze() {
  110. if (IsFrozen) {
  111. return;
  112. }
  113. _frozen = true;
  114. }
  115. public override bool Equals(object other) {
  116. return Equals(other as Issue307);
  117. }
  118. public bool Equals(Issue307 other) {
  119. if (ReferenceEquals(other, null)) {
  120. return false;
  121. }
  122. if (ReferenceEquals(other, this)) {
  123. return true;
  124. }
  125. return true;
  126. }
  127. public override int GetHashCode() {
  128. int hash = 1;
  129. return hash;
  130. }
  131. public override string ToString() {
  132. return pb::JsonFormatter.Default.Format(this);
  133. }
  134. public void WriteTo(pb::CodedOutputStream output) {
  135. }
  136. public int CalculateSize() {
  137. int size = 0;
  138. return size;
  139. }
  140. public void MergeFrom(Issue307 other) {
  141. if (other == null) {
  142. return;
  143. }
  144. }
  145. public void MergeFrom(pb::CodedInputStream input) {
  146. uint tag;
  147. while (input.ReadTag(out tag)) {
  148. switch(tag) {
  149. case 0:
  150. throw pb::InvalidProtocolBufferException.InvalidTag();
  151. default:
  152. if (pb::WireFormat.IsEndGroupTag(tag)) {
  153. return;
  154. }
  155. break;
  156. }
  157. }
  158. }
  159. #region Nested types
  160. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  161. public static partial class Types {
  162. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  163. public sealed partial class NestedOnce : pb::IMessage<NestedOnce> {
  164. private static readonly pb::MessageParser<NestedOnce> _parser = new pb::MessageParser<NestedOnce>(() => new NestedOnce());
  165. public static pb::MessageParser<NestedOnce> Parser { get { return _parser; } }
  166. private static readonly string[] _fieldNames = new string[] { };
  167. private static readonly uint[] _fieldTags = new uint[] { };
  168. public static pbd::MessageDescriptor Descriptor {
  169. get { return global::UnitTest.Issues.TestProtos.Issue307.Descriptor.NestedTypes[0]; }
  170. }
  171. public pb::FieldAccess.FieldAccessorTable Fields {
  172. get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_Issue307_NestedOnce__FieldAccessorTable; }
  173. }
  174. private bool _frozen = false;
  175. public bool IsFrozen { get { return _frozen; } }
  176. public NestedOnce() {
  177. OnConstruction();
  178. }
  179. partial void OnConstruction();
  180. public NestedOnce(NestedOnce other) : this() {
  181. }
  182. public NestedOnce Clone() {
  183. return new NestedOnce(this);
  184. }
  185. public void Freeze() {
  186. if (IsFrozen) {
  187. return;
  188. }
  189. _frozen = true;
  190. }
  191. public override bool Equals(object other) {
  192. return Equals(other as NestedOnce);
  193. }
  194. public bool Equals(NestedOnce other) {
  195. if (ReferenceEquals(other, null)) {
  196. return false;
  197. }
  198. if (ReferenceEquals(other, this)) {
  199. return true;
  200. }
  201. return true;
  202. }
  203. public override int GetHashCode() {
  204. int hash = 1;
  205. return hash;
  206. }
  207. public override string ToString() {
  208. return pb::JsonFormatter.Default.Format(this);
  209. }
  210. public void WriteTo(pb::CodedOutputStream output) {
  211. }
  212. public int CalculateSize() {
  213. int size = 0;
  214. return size;
  215. }
  216. public void MergeFrom(NestedOnce other) {
  217. if (other == null) {
  218. return;
  219. }
  220. }
  221. public void MergeFrom(pb::CodedInputStream input) {
  222. uint tag;
  223. while (input.ReadTag(out tag)) {
  224. switch(tag) {
  225. case 0:
  226. throw pb::InvalidProtocolBufferException.InvalidTag();
  227. default:
  228. if (pb::WireFormat.IsEndGroupTag(tag)) {
  229. return;
  230. }
  231. break;
  232. }
  233. }
  234. }
  235. #region Nested types
  236. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  237. public static partial class Types {
  238. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  239. public sealed partial class NestedTwice : pb::IMessage<NestedTwice> {
  240. private static readonly pb::MessageParser<NestedTwice> _parser = new pb::MessageParser<NestedTwice>(() => new NestedTwice());
  241. public static pb::MessageParser<NestedTwice> Parser { get { return _parser; } }
  242. private static readonly string[] _fieldNames = new string[] { };
  243. private static readonly uint[] _fieldTags = new uint[] { };
  244. public static pbd::MessageDescriptor Descriptor {
  245. get { return global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Descriptor.NestedTypes[0]; }
  246. }
  247. public pb::FieldAccess.FieldAccessorTable Fields {
  248. get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_Issue307_NestedOnce_NestedTwice__FieldAccessorTable; }
  249. }
  250. private bool _frozen = false;
  251. public bool IsFrozen { get { return _frozen; } }
  252. public NestedTwice() {
  253. OnConstruction();
  254. }
  255. partial void OnConstruction();
  256. public NestedTwice(NestedTwice other) : this() {
  257. }
  258. public NestedTwice Clone() {
  259. return new NestedTwice(this);
  260. }
  261. public void Freeze() {
  262. if (IsFrozen) {
  263. return;
  264. }
  265. _frozen = true;
  266. }
  267. public override bool Equals(object other) {
  268. return Equals(other as NestedTwice);
  269. }
  270. public bool Equals(NestedTwice other) {
  271. if (ReferenceEquals(other, null)) {
  272. return false;
  273. }
  274. if (ReferenceEquals(other, this)) {
  275. return true;
  276. }
  277. return true;
  278. }
  279. public override int GetHashCode() {
  280. int hash = 1;
  281. return hash;
  282. }
  283. public override string ToString() {
  284. return pb::JsonFormatter.Default.Format(this);
  285. }
  286. public void WriteTo(pb::CodedOutputStream output) {
  287. }
  288. public int CalculateSize() {
  289. int size = 0;
  290. return size;
  291. }
  292. public void MergeFrom(NestedTwice other) {
  293. if (other == null) {
  294. return;
  295. }
  296. }
  297. public void MergeFrom(pb::CodedInputStream input) {
  298. uint tag;
  299. while (input.ReadTag(out tag)) {
  300. switch(tag) {
  301. case 0:
  302. throw pb::InvalidProtocolBufferException.InvalidTag();
  303. default:
  304. if (pb::WireFormat.IsEndGroupTag(tag)) {
  305. return;
  306. }
  307. break;
  308. }
  309. }
  310. }
  311. }
  312. }
  313. #endregion
  314. }
  315. }
  316. #endregion
  317. }
  318. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  319. public sealed partial class NegativeEnumMessage : pb::IMessage<NegativeEnumMessage> {
  320. private static readonly pb::MessageParser<NegativeEnumMessage> _parser = new pb::MessageParser<NegativeEnumMessage>(() => new NegativeEnumMessage());
  321. public static pb::MessageParser<NegativeEnumMessage> Parser { get { return _parser; } }
  322. private static readonly string[] _fieldNames = new string[] { "packed_values", "value", "values" };
  323. private static readonly uint[] _fieldTags = new uint[] { 26, 8, 16 };
  324. public static pbd::MessageDescriptor Descriptor {
  325. get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[1]; }
  326. }
  327. public pb::FieldAccess.FieldAccessorTable Fields {
  328. get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_NegativeEnumMessage__FieldAccessorTable; }
  329. }
  330. private bool _frozen = false;
  331. public bool IsFrozen { get { return _frozen; } }
  332. public NegativeEnumMessage() {
  333. OnConstruction();
  334. }
  335. partial void OnConstruction();
  336. public NegativeEnumMessage(NegativeEnumMessage other) : this() {
  337. value_ = other.value_;
  338. values_ = other.values_.Clone();
  339. packedValues_ = other.packedValues_.Clone();
  340. }
  341. public NegativeEnumMessage Clone() {
  342. return new NegativeEnumMessage(this);
  343. }
  344. public void Freeze() {
  345. if (IsFrozen) {
  346. return;
  347. }
  348. _frozen = true;
  349. values_.Freeze();
  350. packedValues_.Freeze();
  351. }
  352. public const int ValueFieldNumber = 1;
  353. private global::UnitTest.Issues.TestProtos.NegativeEnum value_ = global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM_ZERO;
  354. public global::UnitTest.Issues.TestProtos.NegativeEnum Value {
  355. get { return value_; }
  356. set {
  357. pb::Freezable.CheckMutable(this);
  358. value_ = value;
  359. }
  360. }
  361. public const int ValuesFieldNumber = 2;
  362. private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.NegativeEnum> _repeated_values_codec
  363. = pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::UnitTest.Issues.TestProtos.NegativeEnum) x);private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> values_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum>();
  364. public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> Values {
  365. get { return values_; }
  366. }
  367. public const int PackedValuesFieldNumber = 3;
  368. private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.NegativeEnum> _repeated_packedValues_codec
  369. = pb::FieldCodec.ForEnum(26, x => (int) x, x => (global::UnitTest.Issues.TestProtos.NegativeEnum) x);private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> packedValues_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum>();
  370. public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> PackedValues {
  371. get { return packedValues_; }
  372. }
  373. public override bool Equals(object other) {
  374. return Equals(other as NegativeEnumMessage);
  375. }
  376. public bool Equals(NegativeEnumMessage other) {
  377. if (ReferenceEquals(other, null)) {
  378. return false;
  379. }
  380. if (ReferenceEquals(other, this)) {
  381. return true;
  382. }
  383. if (Value != other.Value) return false;
  384. if(!values_.Equals(other.values_)) return false;
  385. if(!packedValues_.Equals(other.packedValues_)) return false;
  386. return true;
  387. }
  388. public override int GetHashCode() {
  389. int hash = 1;
  390. if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM_ZERO) hash ^= Value.GetHashCode();
  391. hash ^= values_.GetHashCode();
  392. hash ^= packedValues_.GetHashCode();
  393. return hash;
  394. }
  395. public override string ToString() {
  396. return pb::JsonFormatter.Default.Format(this);
  397. }
  398. public void WriteTo(pb::CodedOutputStream output) {
  399. if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM_ZERO) {
  400. output.WriteRawTag(8);
  401. output.WriteEnum((int) Value);
  402. }
  403. values_.WriteTo(output, _repeated_values_codec);
  404. packedValues_.WriteTo(output, _repeated_packedValues_codec);
  405. }
  406. public int CalculateSize() {
  407. int size = 0;
  408. if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM_ZERO) {
  409. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Value);
  410. }
  411. size += values_.CalculateSize(_repeated_values_codec);
  412. size += packedValues_.CalculateSize(_repeated_packedValues_codec);
  413. return size;
  414. }
  415. public void MergeFrom(NegativeEnumMessage other) {
  416. if (other == null) {
  417. return;
  418. }
  419. if (other.Value != global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM_ZERO) {
  420. Value = other.Value;
  421. }
  422. values_.Add(other.values_);
  423. packedValues_.Add(other.packedValues_);
  424. }
  425. public void MergeFrom(pb::CodedInputStream input) {
  426. uint tag;
  427. while (input.ReadTag(out tag)) {
  428. switch(tag) {
  429. case 0:
  430. throw pb::InvalidProtocolBufferException.InvalidTag();
  431. default:
  432. if (pb::WireFormat.IsEndGroupTag(tag)) {
  433. return;
  434. }
  435. break;
  436. case 8: {
  437. value_ = (global::UnitTest.Issues.TestProtos.NegativeEnum) input.ReadEnum();
  438. break;
  439. }
  440. case 18:
  441. case 16: {
  442. values_.AddEntriesFrom(input, _repeated_values_codec);
  443. break;
  444. }
  445. case 26:
  446. case 24: {
  447. packedValues_.AddEntriesFrom(input, _repeated_packedValues_codec);
  448. break;
  449. }
  450. }
  451. }
  452. }
  453. }
  454. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  455. public sealed partial class DeprecatedChild : pb::IMessage<DeprecatedChild> {
  456. private static readonly pb::MessageParser<DeprecatedChild> _parser = new pb::MessageParser<DeprecatedChild>(() => new DeprecatedChild());
  457. public static pb::MessageParser<DeprecatedChild> Parser { get { return _parser; } }
  458. private static readonly string[] _fieldNames = new string[] { };
  459. private static readonly uint[] _fieldTags = new uint[] { };
  460. public static pbd::MessageDescriptor Descriptor {
  461. get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[2]; }
  462. }
  463. public pb::FieldAccess.FieldAccessorTable Fields {
  464. get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_DeprecatedChild__FieldAccessorTable; }
  465. }
  466. private bool _frozen = false;
  467. public bool IsFrozen { get { return _frozen; } }
  468. public DeprecatedChild() {
  469. OnConstruction();
  470. }
  471. partial void OnConstruction();
  472. public DeprecatedChild(DeprecatedChild other) : this() {
  473. }
  474. public DeprecatedChild Clone() {
  475. return new DeprecatedChild(this);
  476. }
  477. public void Freeze() {
  478. if (IsFrozen) {
  479. return;
  480. }
  481. _frozen = true;
  482. }
  483. public override bool Equals(object other) {
  484. return Equals(other as DeprecatedChild);
  485. }
  486. public bool Equals(DeprecatedChild other) {
  487. if (ReferenceEquals(other, null)) {
  488. return false;
  489. }
  490. if (ReferenceEquals(other, this)) {
  491. return true;
  492. }
  493. return true;
  494. }
  495. public override int GetHashCode() {
  496. int hash = 1;
  497. return hash;
  498. }
  499. public override string ToString() {
  500. return pb::JsonFormatter.Default.Format(this);
  501. }
  502. public void WriteTo(pb::CodedOutputStream output) {
  503. }
  504. public int CalculateSize() {
  505. int size = 0;
  506. return size;
  507. }
  508. public void MergeFrom(DeprecatedChild other) {
  509. if (other == null) {
  510. return;
  511. }
  512. }
  513. public void MergeFrom(pb::CodedInputStream input) {
  514. uint tag;
  515. while (input.ReadTag(out tag)) {
  516. switch(tag) {
  517. case 0:
  518. throw pb::InvalidProtocolBufferException.InvalidTag();
  519. default:
  520. if (pb::WireFormat.IsEndGroupTag(tag)) {
  521. return;
  522. }
  523. break;
  524. }
  525. }
  526. }
  527. }
  528. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  529. public sealed partial class DeprecatedFieldsMessage : pb::IMessage<DeprecatedFieldsMessage> {
  530. private static readonly pb::MessageParser<DeprecatedFieldsMessage> _parser = new pb::MessageParser<DeprecatedFieldsMessage>(() => new DeprecatedFieldsMessage());
  531. public static pb::MessageParser<DeprecatedFieldsMessage> Parser { get { return _parser; } }
  532. private static readonly string[] _fieldNames = new string[] { "EnumArray", "EnumValue", "MessageArray", "MessageValue", "PrimitiveArray", "PrimitiveValue" };
  533. private static readonly uint[] _fieldTags = new uint[] { 50, 40, 34, 26, 18, 8 };
  534. public static pbd::MessageDescriptor Descriptor {
  535. get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[3]; }
  536. }
  537. public pb::FieldAccess.FieldAccessorTable Fields {
  538. get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_DeprecatedFieldsMessage__FieldAccessorTable; }
  539. }
  540. private bool _frozen = false;
  541. public bool IsFrozen { get { return _frozen; } }
  542. public DeprecatedFieldsMessage() {
  543. OnConstruction();
  544. }
  545. partial void OnConstruction();
  546. public DeprecatedFieldsMessage(DeprecatedFieldsMessage other) : this() {
  547. primitiveValue_ = other.primitiveValue_;
  548. primitiveArray_ = other.primitiveArray_.Clone();
  549. MessageValue = other.messageValue_ != null ? other.MessageValue.Clone() : null;
  550. messageArray_ = other.messageArray_.Clone();
  551. enumValue_ = other.enumValue_;
  552. enumArray_ = other.enumArray_.Clone();
  553. }
  554. public DeprecatedFieldsMessage Clone() {
  555. return new DeprecatedFieldsMessage(this);
  556. }
  557. public void Freeze() {
  558. if (IsFrozen) {
  559. return;
  560. }
  561. _frozen = true;
  562. primitiveArray_.Freeze();
  563. if (messageValue_ != null) MessageValue.Freeze();
  564. messageArray_.Freeze();
  565. enumArray_.Freeze();
  566. }
  567. public const int PrimitiveValueFieldNumber = 1;
  568. private int primitiveValue_;
  569. [global::System.ObsoleteAttribute()]
  570. public int PrimitiveValue {
  571. get { return primitiveValue_; }
  572. set {
  573. pb::Freezable.CheckMutable(this);
  574. primitiveValue_ = value;
  575. }
  576. }
  577. public const int PrimitiveArrayFieldNumber = 2;
  578. private static readonly pb::FieldCodec<int> _repeated_primitiveArray_codec
  579. = pb::FieldCodec.ForInt32(18);
  580. private readonly pbc::RepeatedField<int> primitiveArray_ = new pbc::RepeatedField<int>();
  581. [global::System.ObsoleteAttribute()]
  582. public pbc::RepeatedField<int> PrimitiveArray {
  583. get { return primitiveArray_; }
  584. }
  585. public const int MessageValueFieldNumber = 3;
  586. private global::UnitTest.Issues.TestProtos.DeprecatedChild messageValue_;
  587. [global::System.ObsoleteAttribute()]
  588. public global::UnitTest.Issues.TestProtos.DeprecatedChild MessageValue {
  589. get { return messageValue_; }
  590. set {
  591. pb::Freezable.CheckMutable(this);
  592. messageValue_ = value;
  593. }
  594. }
  595. public const int MessageArrayFieldNumber = 4;
  596. private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.DeprecatedChild> _repeated_messageArray_codec
  597. = pb::FieldCodec.ForMessage(34, global::UnitTest.Issues.TestProtos.DeprecatedChild.Parser);
  598. private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild> messageArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild>();
  599. [global::System.ObsoleteAttribute()]
  600. public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild> MessageArray {
  601. get { return messageArray_; }
  602. }
  603. public const int EnumValueFieldNumber = 5;
  604. private global::UnitTest.Issues.TestProtos.DeprecatedEnum enumValue_ = global::UnitTest.Issues.TestProtos.DeprecatedEnum.DEPRECATED_ZERO;
  605. [global::System.ObsoleteAttribute()]
  606. public global::UnitTest.Issues.TestProtos.DeprecatedEnum EnumValue {
  607. get { return enumValue_; }
  608. set {
  609. pb::Freezable.CheckMutable(this);
  610. enumValue_ = value;
  611. }
  612. }
  613. public const int EnumArrayFieldNumber = 6;
  614. private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.DeprecatedEnum> _repeated_enumArray_codec
  615. = pb::FieldCodec.ForEnum(50, x => (int) x, x => (global::UnitTest.Issues.TestProtos.DeprecatedEnum) x);private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum> enumArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum>();
  616. [global::System.ObsoleteAttribute()]
  617. public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum> EnumArray {
  618. get { return enumArray_; }
  619. }
  620. public override bool Equals(object other) {
  621. return Equals(other as DeprecatedFieldsMessage);
  622. }
  623. public bool Equals(DeprecatedFieldsMessage other) {
  624. if (ReferenceEquals(other, null)) {
  625. return false;
  626. }
  627. if (ReferenceEquals(other, this)) {
  628. return true;
  629. }
  630. if (PrimitiveValue != other.PrimitiveValue) return false;
  631. if(!primitiveArray_.Equals(other.primitiveArray_)) return false;
  632. if (!object.Equals(MessageValue, other.MessageValue)) return false;
  633. if(!messageArray_.Equals(other.messageArray_)) return false;
  634. if (EnumValue != other.EnumValue) return false;
  635. if(!enumArray_.Equals(other.enumArray_)) return false;
  636. return true;
  637. }
  638. public override int GetHashCode() {
  639. int hash = 1;
  640. if (PrimitiveValue != 0) hash ^= PrimitiveValue.GetHashCode();
  641. hash ^= primitiveArray_.GetHashCode();
  642. if (messageValue_ != null) hash ^= MessageValue.GetHashCode();
  643. hash ^= messageArray_.GetHashCode();
  644. if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DEPRECATED_ZERO) hash ^= EnumValue.GetHashCode();
  645. hash ^= enumArray_.GetHashCode();
  646. return hash;
  647. }
  648. public override string ToString() {
  649. return pb::JsonFormatter.Default.Format(this);
  650. }
  651. public void WriteTo(pb::CodedOutputStream output) {
  652. if (PrimitiveValue != 0) {
  653. output.WriteRawTag(8);
  654. output.WriteInt32(PrimitiveValue);
  655. }
  656. primitiveArray_.WriteTo(output, _repeated_primitiveArray_codec);
  657. if (messageValue_ != null) {
  658. output.WriteRawTag(26);
  659. output.WriteMessage(MessageValue);
  660. }
  661. messageArray_.WriteTo(output, _repeated_messageArray_codec);
  662. if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DEPRECATED_ZERO) {
  663. output.WriteRawTag(40);
  664. output.WriteEnum((int) EnumValue);
  665. }
  666. enumArray_.WriteTo(output, _repeated_enumArray_codec);
  667. }
  668. public int CalculateSize() {
  669. int size = 0;
  670. if (PrimitiveValue != 0) {
  671. size += 1 + pb::CodedOutputStream.ComputeInt32Size(PrimitiveValue);
  672. }
  673. size += primitiveArray_.CalculateSize(_repeated_primitiveArray_codec);
  674. if (messageValue_ != null) {
  675. size += 1 + pb::CodedOutputStream.ComputeMessageSize(MessageValue);
  676. }
  677. size += messageArray_.CalculateSize(_repeated_messageArray_codec);
  678. if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DEPRECATED_ZERO) {
  679. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnumValue);
  680. }
  681. size += enumArray_.CalculateSize(_repeated_enumArray_codec);
  682. return size;
  683. }
  684. public void MergeFrom(DeprecatedFieldsMessage other) {
  685. if (other == null) {
  686. return;
  687. }
  688. if (other.PrimitiveValue != 0) {
  689. PrimitiveValue = other.PrimitiveValue;
  690. }
  691. primitiveArray_.Add(other.primitiveArray_);
  692. if (other.messageValue_ != null) {
  693. if (messageValue_ == null) {
  694. messageValue_ = new global::UnitTest.Issues.TestProtos.DeprecatedChild();
  695. }
  696. MessageValue.MergeFrom(other.MessageValue);
  697. }
  698. messageArray_.Add(other.messageArray_);
  699. if (other.EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DEPRECATED_ZERO) {
  700. EnumValue = other.EnumValue;
  701. }
  702. enumArray_.Add(other.enumArray_);
  703. }
  704. public void MergeFrom(pb::CodedInputStream input) {
  705. uint tag;
  706. while (input.ReadTag(out tag)) {
  707. switch(tag) {
  708. case 0:
  709. throw pb::InvalidProtocolBufferException.InvalidTag();
  710. default:
  711. if (pb::WireFormat.IsEndGroupTag(tag)) {
  712. return;
  713. }
  714. break;
  715. case 8: {
  716. PrimitiveValue = input.ReadInt32();
  717. break;
  718. }
  719. case 18:
  720. case 16: {
  721. primitiveArray_.AddEntriesFrom(input, _repeated_primitiveArray_codec);
  722. break;
  723. }
  724. case 26: {
  725. if (messageValue_ == null) {
  726. messageValue_ = new global::UnitTest.Issues.TestProtos.DeprecatedChild();
  727. }
  728. input.ReadMessage(messageValue_);
  729. break;
  730. }
  731. case 34: {
  732. messageArray_.AddEntriesFrom(input, _repeated_messageArray_codec);
  733. break;
  734. }
  735. case 40: {
  736. enumValue_ = (global::UnitTest.Issues.TestProtos.DeprecatedEnum) input.ReadEnum();
  737. break;
  738. }
  739. case 50:
  740. case 48: {
  741. enumArray_.AddEntriesFrom(input, _repeated_enumArray_codec);
  742. break;
  743. }
  744. }
  745. }
  746. }
  747. }
  748. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  749. public sealed partial class ItemField : pb::IMessage<ItemField> {
  750. private static readonly pb::MessageParser<ItemField> _parser = new pb::MessageParser<ItemField>(() => new ItemField());
  751. public static pb::MessageParser<ItemField> Parser { get { return _parser; } }
  752. private static readonly string[] _fieldNames = new string[] { "item" };
  753. private static readonly uint[] _fieldTags = new uint[] { 8 };
  754. public static pbd::MessageDescriptor Descriptor {
  755. get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.MessageTypes[4]; }
  756. }
  757. public pb::FieldAccess.FieldAccessorTable Fields {
  758. get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_ItemField__FieldAccessorTable; }
  759. }
  760. private bool _frozen = false;
  761. public bool IsFrozen { get { return _frozen; } }
  762. public ItemField() {
  763. OnConstruction();
  764. }
  765. partial void OnConstruction();
  766. public ItemField(ItemField other) : this() {
  767. item_ = other.item_;
  768. }
  769. public ItemField Clone() {
  770. return new ItemField(this);
  771. }
  772. public void Freeze() {
  773. if (IsFrozen) {
  774. return;
  775. }
  776. _frozen = true;
  777. }
  778. public const int ItemFieldNumber = 1;
  779. private int item_;
  780. public int Item {
  781. get { return item_; }
  782. set {
  783. pb::Freezable.CheckMutable(this);
  784. item_ = value;
  785. }
  786. }
  787. public override bool Equals(object other) {
  788. return Equals(other as ItemField);
  789. }
  790. public bool Equals(ItemField other) {
  791. if (ReferenceEquals(other, null)) {
  792. return false;
  793. }
  794. if (ReferenceEquals(other, this)) {
  795. return true;
  796. }
  797. if (Item != other.Item) return false;
  798. return true;
  799. }
  800. public override int GetHashCode() {
  801. int hash = 1;
  802. if (Item != 0) hash ^= Item.GetHashCode();
  803. return hash;
  804. }
  805. public override string ToString() {
  806. return pb::JsonFormatter.Default.Format(this);
  807. }
  808. public void WriteTo(pb::CodedOutputStream output) {
  809. if (Item != 0) {
  810. output.WriteRawTag(8);
  811. output.WriteInt32(Item);
  812. }
  813. }
  814. public int CalculateSize() {
  815. int size = 0;
  816. if (Item != 0) {
  817. size += 1 + pb::CodedOutputStream.ComputeInt32Size(Item);
  818. }
  819. return size;
  820. }
  821. public void MergeFrom(ItemField other) {
  822. if (other == null) {
  823. return;
  824. }
  825. if (other.Item != 0) {
  826. Item = other.Item;
  827. }
  828. }
  829. public void MergeFrom(pb::CodedInputStream input) {
  830. uint tag;
  831. while (input.ReadTag(out tag)) {
  832. switch(tag) {
  833. case 0:
  834. throw pb::InvalidProtocolBufferException.InvalidTag();
  835. default:
  836. if (pb::WireFormat.IsEndGroupTag(tag)) {
  837. return;
  838. }
  839. break;
  840. case 8: {
  841. Item = input.ReadInt32();
  842. break;
  843. }
  844. }
  845. }
  846. }
  847. }
  848. #endregion
  849. }
  850. #endregion Designer generated code