Helloworld.cs 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: helloworld.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 Helloworld {
  10. /// <summary>Holder for reflection information generated from helloworld.proto</summary>
  11. public static partial class HelloworldReflection {
  12. #region Descriptor
  13. /// <summary>File descriptor for helloworld.proto</summary>
  14. public static pbr::FileDescriptor Descriptor {
  15. get { return descriptor; }
  16. }
  17. private static pbr::FileDescriptor descriptor;
  18. static HelloworldReflection() {
  19. byte[] descriptorData = global::System.Convert.FromBase64String(
  20. string.Concat(
  21. "ChBoZWxsb3dvcmxkLnByb3RvEgpoZWxsb3dvcmxkIhwKDEhlbGxvUmVxdWVz",
  22. "dBIMCgRuYW1lGAEgASgJIh0KCkhlbGxvUmVwbHkSDwoHbWVzc2FnZRgBIAEo",
  23. "CTJJCgdHcmVldGVyEj4KCFNheUhlbGxvEhguaGVsbG93b3JsZC5IZWxsb1Jl",
  24. "cXVlc3QaFi5oZWxsb3dvcmxkLkhlbGxvUmVwbHkiAEI2Chtpby5ncnBjLmV4",
  25. "YW1wbGVzLmhlbGxvd29ybGRCD0hlbGxvV29ybGRQcm90b1ABogIDSExXYgZw",
  26. "cm90bzM="));
  27. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  28. new pbr::FileDescriptor[] { },
  29. new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
  30. new pbr::GeneratedClrTypeInfo(typeof(global::Helloworld.HelloRequest), global::Helloworld.HelloRequest.Parser, new[]{ "Name" }, null, null, null),
  31. new pbr::GeneratedClrTypeInfo(typeof(global::Helloworld.HelloReply), global::Helloworld.HelloReply.Parser, new[]{ "Message" }, null, null, null)
  32. }));
  33. }
  34. #endregion
  35. }
  36. #region Messages
  37. /// <summary>
  38. /// The request message containing the user's name.
  39. /// </summary>
  40. public sealed partial class HelloRequest : pb::IMessage<HelloRequest> {
  41. private static readonly pb::MessageParser<HelloRequest> _parser = new pb::MessageParser<HelloRequest>(() => new HelloRequest());
  42. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  43. public static pb::MessageParser<HelloRequest> Parser { get { return _parser; } }
  44. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  45. public static pbr::MessageDescriptor Descriptor {
  46. get { return global::Helloworld.HelloworldReflection.Descriptor.MessageTypes[0]; }
  47. }
  48. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  49. pbr::MessageDescriptor pb::IMessage.Descriptor {
  50. get { return Descriptor; }
  51. }
  52. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  53. public HelloRequest() {
  54. OnConstruction();
  55. }
  56. partial void OnConstruction();
  57. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  58. public HelloRequest(HelloRequest other) : this() {
  59. name_ = other.name_;
  60. }
  61. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  62. public HelloRequest Clone() {
  63. return new HelloRequest(this);
  64. }
  65. /// <summary>Field number for the "name" field.</summary>
  66. public const int NameFieldNumber = 1;
  67. private string name_ = "";
  68. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  69. public string Name {
  70. get { return name_; }
  71. set {
  72. name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  73. }
  74. }
  75. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  76. public override bool Equals(object other) {
  77. return Equals(other as HelloRequest);
  78. }
  79. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  80. public bool Equals(HelloRequest other) {
  81. if (ReferenceEquals(other, null)) {
  82. return false;
  83. }
  84. if (ReferenceEquals(other, this)) {
  85. return true;
  86. }
  87. if (Name != other.Name) return false;
  88. return true;
  89. }
  90. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  91. public override int GetHashCode() {
  92. int hash = 1;
  93. if (Name.Length != 0) hash ^= Name.GetHashCode();
  94. return hash;
  95. }
  96. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  97. public override string ToString() {
  98. return pb::JsonFormatter.ToDiagnosticString(this);
  99. }
  100. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  101. public void WriteTo(pb::CodedOutputStream output) {
  102. if (Name.Length != 0) {
  103. output.WriteRawTag(10);
  104. output.WriteString(Name);
  105. }
  106. }
  107. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  108. public int CalculateSize() {
  109. int size = 0;
  110. if (Name.Length != 0) {
  111. size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
  112. }
  113. return size;
  114. }
  115. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  116. public void MergeFrom(HelloRequest other) {
  117. if (other == null) {
  118. return;
  119. }
  120. if (other.Name.Length != 0) {
  121. Name = other.Name;
  122. }
  123. }
  124. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  125. public void MergeFrom(pb::CodedInputStream input) {
  126. uint tag;
  127. while ((tag = input.ReadTag()) != 0) {
  128. switch(tag) {
  129. default:
  130. input.SkipLastField();
  131. break;
  132. case 10: {
  133. Name = input.ReadString();
  134. break;
  135. }
  136. }
  137. }
  138. }
  139. }
  140. /// <summary>
  141. /// The response message containing the greetings
  142. /// </summary>
  143. public sealed partial class HelloReply : pb::IMessage<HelloReply> {
  144. private static readonly pb::MessageParser<HelloReply> _parser = new pb::MessageParser<HelloReply>(() => new HelloReply());
  145. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  146. public static pb::MessageParser<HelloReply> Parser { get { return _parser; } }
  147. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  148. public static pbr::MessageDescriptor Descriptor {
  149. get { return global::Helloworld.HelloworldReflection.Descriptor.MessageTypes[1]; }
  150. }
  151. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  152. pbr::MessageDescriptor pb::IMessage.Descriptor {
  153. get { return Descriptor; }
  154. }
  155. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  156. public HelloReply() {
  157. OnConstruction();
  158. }
  159. partial void OnConstruction();
  160. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  161. public HelloReply(HelloReply other) : this() {
  162. message_ = other.message_;
  163. }
  164. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  165. public HelloReply Clone() {
  166. return new HelloReply(this);
  167. }
  168. /// <summary>Field number for the "message" field.</summary>
  169. public const int MessageFieldNumber = 1;
  170. private string message_ = "";
  171. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  172. public string Message {
  173. get { return message_; }
  174. set {
  175. message_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  176. }
  177. }
  178. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  179. public override bool Equals(object other) {
  180. return Equals(other as HelloReply);
  181. }
  182. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  183. public bool Equals(HelloReply other) {
  184. if (ReferenceEquals(other, null)) {
  185. return false;
  186. }
  187. if (ReferenceEquals(other, this)) {
  188. return true;
  189. }
  190. if (Message != other.Message) return false;
  191. return true;
  192. }
  193. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  194. public override int GetHashCode() {
  195. int hash = 1;
  196. if (Message.Length != 0) hash ^= Message.GetHashCode();
  197. return hash;
  198. }
  199. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  200. public override string ToString() {
  201. return pb::JsonFormatter.ToDiagnosticString(this);
  202. }
  203. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  204. public void WriteTo(pb::CodedOutputStream output) {
  205. if (Message.Length != 0) {
  206. output.WriteRawTag(10);
  207. output.WriteString(Message);
  208. }
  209. }
  210. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  211. public int CalculateSize() {
  212. int size = 0;
  213. if (Message.Length != 0) {
  214. size += 1 + pb::CodedOutputStream.ComputeStringSize(Message);
  215. }
  216. return size;
  217. }
  218. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  219. public void MergeFrom(HelloReply other) {
  220. if (other == null) {
  221. return;
  222. }
  223. if (other.Message.Length != 0) {
  224. Message = other.Message;
  225. }
  226. }
  227. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  228. public void MergeFrom(pb::CodedInputStream input) {
  229. uint tag;
  230. while ((tag = input.ReadTag()) != 0) {
  231. switch(tag) {
  232. default:
  233. input.SkipLastField();
  234. break;
  235. case 10: {
  236. Message = input.ReadString();
  237. break;
  238. }
  239. }
  240. }
  241. }
  242. }
  243. #endregion
  244. }
  245. #endregion Designer generated code