UnittestIssue6936C.cs 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: unittest_issue6936_c.proto
  4. // </auto-generated>
  5. #pragma warning disable 1591, 0612, 3021
  6. #region Designer generated code
  7. using pb = global::Google.Protobuf;
  8. using pbc = global::Google.Protobuf.Collections;
  9. using pbr = global::Google.Protobuf.Reflection;
  10. using scg = global::System.Collections.Generic;
  11. namespace UnitTest.Issues.TestProtos {
  12. /// <summary>Holder for reflection information generated from unittest_issue6936_c.proto</summary>
  13. public static partial class UnittestIssue6936CReflection {
  14. #region Descriptor
  15. /// <summary>File descriptor for unittest_issue6936_c.proto</summary>
  16. public static pbr::FileDescriptor Descriptor {
  17. get { return descriptor; }
  18. }
  19. private static pbr::FileDescriptor descriptor;
  20. static UnittestIssue6936CReflection() {
  21. byte[] descriptorData = global::System.Convert.FromBase64String(
  22. string.Concat(
  23. "Chp1bml0dGVzdF9pc3N1ZTY5MzZfYy5wcm90bxIPdW5pdHRlc3RfaXNzdWVz",
  24. "Ghp1bml0dGVzdF9pc3N1ZTY5MzZfYS5wcm90bxoadW5pdHRlc3RfaXNzdWU2",
  25. "OTM2X2IucHJvdG8iMQoDQmFyEiEKA2ZvbxgBIAEoCzIULnVuaXR0ZXN0X2lz",
  26. "c3Vlcy5Gb286B4K1GANiYXJCHaoCGlVuaXRUZXN0Lklzc3Vlcy5UZXN0UHJv",
  27. "dG9zYgZwcm90bzM="));
  28. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  29. new pbr::FileDescriptor[] { global::UnitTest.Issues.TestProtos.UnittestIssue6936AReflection.Descriptor, global::UnitTest.Issues.TestProtos.UnittestIssue6936BReflection.Descriptor, },
  30. new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
  31. new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.Bar), global::UnitTest.Issues.TestProtos.Bar.Parser, new[]{ "Foo" }, null, null, null, null)
  32. }));
  33. }
  34. #endregion
  35. }
  36. #region Messages
  37. public sealed partial class Bar : pb::IMessage<Bar>
  38. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  39. , pb::IBufferMessage
  40. #endif
  41. {
  42. private static readonly pb::MessageParser<Bar> _parser = new pb::MessageParser<Bar>(() => new Bar());
  43. private pb::UnknownFieldSet _unknownFields;
  44. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  45. public static pb::MessageParser<Bar> Parser { get { return _parser; } }
  46. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  47. public static pbr::MessageDescriptor Descriptor {
  48. get { return global::UnitTest.Issues.TestProtos.UnittestIssue6936CReflection.Descriptor.MessageTypes[0]; }
  49. }
  50. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  51. pbr::MessageDescriptor pb::IMessage.Descriptor {
  52. get { return Descriptor; }
  53. }
  54. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  55. public Bar() {
  56. OnConstruction();
  57. }
  58. partial void OnConstruction();
  59. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  60. public Bar(Bar other) : this() {
  61. foo_ = other.foo_ != null ? other.foo_.Clone() : null;
  62. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  63. }
  64. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  65. public Bar Clone() {
  66. return new Bar(this);
  67. }
  68. /// <summary>Field number for the "foo" field.</summary>
  69. public const int FooFieldNumber = 1;
  70. private global::UnitTest.Issues.TestProtos.Foo foo_;
  71. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  72. public global::UnitTest.Issues.TestProtos.Foo Foo {
  73. get { return foo_; }
  74. set {
  75. foo_ = value;
  76. }
  77. }
  78. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  79. public override bool Equals(object other) {
  80. return Equals(other as Bar);
  81. }
  82. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  83. public bool Equals(Bar other) {
  84. if (ReferenceEquals(other, null)) {
  85. return false;
  86. }
  87. if (ReferenceEquals(other, this)) {
  88. return true;
  89. }
  90. if (!object.Equals(Foo, other.Foo)) return false;
  91. return Equals(_unknownFields, other._unknownFields);
  92. }
  93. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  94. public override int GetHashCode() {
  95. int hash = 1;
  96. if (foo_ != null) hash ^= Foo.GetHashCode();
  97. if (_unknownFields != null) {
  98. hash ^= _unknownFields.GetHashCode();
  99. }
  100. return hash;
  101. }
  102. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  103. public override string ToString() {
  104. return pb::JsonFormatter.ToDiagnosticString(this);
  105. }
  106. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  107. public void WriteTo(pb::CodedOutputStream output) {
  108. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  109. output.WriteRawMessage(this);
  110. #else
  111. if (foo_ != null) {
  112. output.WriteRawTag(10);
  113. output.WriteMessage(Foo);
  114. }
  115. if (_unknownFields != null) {
  116. _unknownFields.WriteTo(output);
  117. }
  118. #endif
  119. }
  120. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  121. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  122. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  123. if (foo_ != null) {
  124. output.WriteRawTag(10);
  125. output.WriteMessage(Foo);
  126. }
  127. if (_unknownFields != null) {
  128. _unknownFields.WriteTo(ref output);
  129. }
  130. }
  131. #endif
  132. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  133. public int CalculateSize() {
  134. int size = 0;
  135. if (foo_ != null) {
  136. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Foo);
  137. }
  138. if (_unknownFields != null) {
  139. size += _unknownFields.CalculateSize();
  140. }
  141. return size;
  142. }
  143. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  144. public void MergeFrom(Bar other) {
  145. if (other == null) {
  146. return;
  147. }
  148. if (other.foo_ != null) {
  149. if (foo_ == null) {
  150. Foo = new global::UnitTest.Issues.TestProtos.Foo();
  151. }
  152. Foo.MergeFrom(other.Foo);
  153. }
  154. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  155. }
  156. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  157. public void MergeFrom(pb::CodedInputStream input) {
  158. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  159. input.ReadRawMessage(this);
  160. #else
  161. uint tag;
  162. while ((tag = input.ReadTag()) != 0) {
  163. switch(tag) {
  164. default:
  165. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  166. break;
  167. case 10: {
  168. if (foo_ == null) {
  169. Foo = new global::UnitTest.Issues.TestProtos.Foo();
  170. }
  171. input.ReadMessage(Foo);
  172. break;
  173. }
  174. }
  175. }
  176. #endif
  177. }
  178. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  179. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  180. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  181. uint tag;
  182. while ((tag = input.ReadTag()) != 0) {
  183. switch(tag) {
  184. default:
  185. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  186. break;
  187. case 10: {
  188. if (foo_ == null) {
  189. Foo = new global::UnitTest.Issues.TestProtos.Foo();
  190. }
  191. input.ReadMessage(Foo);
  192. break;
  193. }
  194. }
  195. }
  196. }
  197. #endif
  198. }
  199. #endregion
  200. }
  201. #endregion Designer generated code