MessageProto.cs-bak 6.9 KB

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