UnittestIssues.cs 33 KB

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