UnittestImportProto3.cs 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: unittest_import_proto3.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 pbr = global::Google.Protobuf.Reflection;
  8. using scg = global::System.Collections.Generic;
  9. namespace Google.Protobuf.TestProtos {
  10. /// <summary>Holder for reflection information generated from unittest_import_proto3.proto</summary>
  11. public static partial class UnittestImportProto3Reflection {
  12. #region Descriptor
  13. /// <summary>File descriptor for unittest_import_proto3.proto</summary>
  14. public static pbr::FileDescriptor Descriptor {
  15. get { return descriptor; }
  16. }
  17. private static pbr::FileDescriptor descriptor;
  18. static UnittestImportProto3Reflection() {
  19. byte[] descriptorData = global::System.Convert.FromBase64String(
  20. string.Concat(
  21. "Chx1bml0dGVzdF9pbXBvcnRfcHJvdG8zLnByb3RvEhhwcm90b2J1Zl91bml0",
  22. "dGVzdF9pbXBvcnQaI3VuaXR0ZXN0X2ltcG9ydF9wdWJsaWNfcHJvdG8zLnBy",
  23. "b3RvIhoKDUltcG9ydE1lc3NhZ2USCQoBZBgBIAEoBSpZCgpJbXBvcnRFbnVt",
  24. "EhsKF0lNUE9SVF9FTlVNX1VOU1BFQ0lGSUVEEAASDgoKSU1QT1JUX0ZPTxAH",
  25. "Eg4KCklNUE9SVF9CQVIQCBIOCgpJTVBPUlRfQkFaEAlCPAoYY29tLmdvb2ds",
  26. "ZS5wcm90b2J1Zi50ZXN0SAH4AQGqAhpHb29nbGUuUHJvdG9idWYuVGVzdFBy",
  27. "b3Rvc1AAYgZwcm90bzM="));
  28. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  29. new pbr::FileDescriptor[] { global::Google.Protobuf.TestProtos.UnittestImportPublicProto3Reflection.Descriptor, },
  30. new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.TestProtos.ImportEnum), }, new pbr::GeneratedClrTypeInfo[] {
  31. new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.ImportMessage), global::Google.Protobuf.TestProtos.ImportMessage.Parser, new[]{ "D" }, null, null, null)
  32. }));
  33. }
  34. #endregion
  35. }
  36. #region Enums
  37. public enum ImportEnum {
  38. [pbr::OriginalName("IMPORT_ENUM_UNSPECIFIED")] Unspecified = 0,
  39. [pbr::OriginalName("IMPORT_FOO")] ImportFoo = 7,
  40. [pbr::OriginalName("IMPORT_BAR")] ImportBar = 8,
  41. [pbr::OriginalName("IMPORT_BAZ")] ImportBaz = 9,
  42. }
  43. #endregion
  44. #region Messages
  45. public sealed partial class ImportMessage : pb::IMessage<ImportMessage> {
  46. private static readonly pb::MessageParser<ImportMessage> _parser = new pb::MessageParser<ImportMessage>(() => new ImportMessage());
  47. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  48. public static pb::MessageParser<ImportMessage> Parser { get { return _parser; } }
  49. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  50. public static pbr::MessageDescriptor Descriptor {
  51. get { return global::Google.Protobuf.TestProtos.UnittestImportProto3Reflection.Descriptor.MessageTypes[0]; }
  52. }
  53. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  54. pbr::MessageDescriptor pb::IMessage.Descriptor {
  55. get { return Descriptor; }
  56. }
  57. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  58. public ImportMessage() {
  59. OnConstruction();
  60. }
  61. partial void OnConstruction();
  62. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  63. public ImportMessage(ImportMessage other) : this() {
  64. d_ = other.d_;
  65. }
  66. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  67. public ImportMessage Clone() {
  68. return new ImportMessage(this);
  69. }
  70. /// <summary>Field number for the "d" field.</summary>
  71. public const int DFieldNumber = 1;
  72. private int d_;
  73. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  74. public int D {
  75. get { return d_; }
  76. set {
  77. d_ = value;
  78. }
  79. }
  80. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  81. public override bool Equals(object other) {
  82. return Equals(other as ImportMessage);
  83. }
  84. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  85. public bool Equals(ImportMessage other) {
  86. if (ReferenceEquals(other, null)) {
  87. return false;
  88. }
  89. if (ReferenceEquals(other, this)) {
  90. return true;
  91. }
  92. if (D != other.D) return false;
  93. return true;
  94. }
  95. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  96. public override int GetHashCode() {
  97. int hash = 1;
  98. if (D != 0) hash ^= D.GetHashCode();
  99. return hash;
  100. }
  101. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  102. public override string ToString() {
  103. return pb::JsonFormatter.ToDiagnosticString(this);
  104. }
  105. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  106. public void WriteTo(pb::CodedOutputStream output) {
  107. if (D != 0) {
  108. output.WriteRawTag(8);
  109. output.WriteInt32(D);
  110. }
  111. }
  112. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  113. public int CalculateSize() {
  114. int size = 0;
  115. if (D != 0) {
  116. size += 1 + pb::CodedOutputStream.ComputeInt32Size(D);
  117. }
  118. return size;
  119. }
  120. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  121. public void MergeFrom(ImportMessage other) {
  122. if (other == null) {
  123. return;
  124. }
  125. if (other.D != 0) {
  126. D = other.D;
  127. }
  128. }
  129. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  130. public void MergeFrom(pb::CodedInputStream input) {
  131. uint tag;
  132. while ((tag = input.ReadTag()) != 0) {
  133. switch(tag) {
  134. default:
  135. input.SkipLastField();
  136. break;
  137. case 8: {
  138. D = input.ReadInt32();
  139. break;
  140. }
  141. }
  142. }
  143. }
  144. }
  145. #endregion
  146. }
  147. #endregion Designer generated code