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