UnittestImportProto3.cs 4.9 KB

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