UnittestImportProto3.cs 5.5 KB

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