Chat.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: chat.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 Protos {
  10. /// <summary>Holder for reflection information generated from chat.proto</summary>
  11. public static partial class ChatReflection {
  12. #region Descriptor
  13. /// <summary>File descriptor for chat.proto</summary>
  14. public static pbr::FileDescriptor Descriptor {
  15. get { return descriptor; }
  16. }
  17. private static pbr::FileDescriptor descriptor;
  18. static ChatReflection() {
  19. byte[] descriptorData = global::System.Convert.FromBase64String(
  20. string.Concat(
  21. "CgpjaGF0LnByb3RvEgZwcm90b3MaDnVzZXJpbmZvLnByb3RvGgxyZXN1bHQu",
  22. "cHJvdG8iNwoKQ2hhdE5vdGlmeRIMCgRUeXBlGAEgASgNEg4KBlRhcmdldBgC",
  23. "IAEoBBILCgNNc2cYAyABKAkiVwoIQ2hhdFB1c2gSDAoEVHlwZRgBIAEoDRIO",
  24. "CgZUYXJnZXQYAiABKAQSCwoDTXNnGAMgASgJEiAKBlNlbmRlchgEIAEoCzIQ",
  25. "LnByb3Rvcy5Vc2VySW5mbyIlChJTd2l0Y2hXb3JsZFJlcXVlc3QSDwoHV29y",
  26. "bGRJRBgBIAEoDSI1ChNTd2l0Y2hXb3JsZFJlc3BvbnNlEh4KBlJlc3VsdBgB",
  27. "IAEoCzIOLnByb3Rvcy5SZXN1bHRiBnByb3RvMw=="));
  28. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  29. new pbr::FileDescriptor[] { global::Protos.UserinfoReflection.Descriptor, global::Protos.ResultReflection.Descriptor, },
  30. new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
  31. new pbr::GeneratedClrTypeInfo(typeof(global::Protos.ChatNotify), global::Protos.ChatNotify.Parser, new[]{ "Type", "Target", "Msg" }, null, null, null),
  32. new pbr::GeneratedClrTypeInfo(typeof(global::Protos.ChatPush), global::Protos.ChatPush.Parser, new[]{ "Type", "Target", "Msg", "Sender" }, null, null, null),
  33. new pbr::GeneratedClrTypeInfo(typeof(global::Protos.SwitchWorldRequest), global::Protos.SwitchWorldRequest.Parser, new[]{ "WorldID" }, null, null, null),
  34. new pbr::GeneratedClrTypeInfo(typeof(global::Protos.SwitchWorldResponse), global::Protos.SwitchWorldResponse.Parser, new[]{ "Result" }, null, null, null)
  35. }));
  36. }
  37. #endregion
  38. }
  39. #region Messages
  40. public sealed partial class ChatNotify : pb::IMessage<ChatNotify> {
  41. private static readonly pb::MessageParser<ChatNotify> _parser = new pb::MessageParser<ChatNotify>(() => new ChatNotify());
  42. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  43. public static pb::MessageParser<ChatNotify> Parser { get { return _parser; } }
  44. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  45. public static pbr::MessageDescriptor Descriptor {
  46. get { return global::Protos.ChatReflection.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 ChatNotify() {
  54. OnConstruction();
  55. }
  56. partial void OnConstruction();
  57. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  58. public ChatNotify(ChatNotify other) : this() {
  59. type_ = other.type_;
  60. target_ = other.target_;
  61. msg_ = other.msg_;
  62. }
  63. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  64. public ChatNotify Clone() {
  65. return new ChatNotify(this);
  66. }
  67. /// <summary>Field number for the "Type" field.</summary>
  68. public const int TypeFieldNumber = 1;
  69. private uint type_;
  70. /// <summary>
  71. /// 0=世界;1=大厅;2=队伍;3=派对;4=好友(私聊)
  72. /// </summary>
  73. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  74. public uint Type {
  75. get { return type_; }
  76. set {
  77. type_ = value;
  78. }
  79. }
  80. /// <summary>Field number for the "Target" field.</summary>
  81. public const int TargetFieldNumber = 2;
  82. private ulong target_;
  83. /// <summary>
  84. /// 对象id, 对应Type字段的世界id,roomid partyid, 好友id
  85. /// </summary>
  86. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  87. public ulong Target {
  88. get { return target_; }
  89. set {
  90. target_ = value;
  91. }
  92. }
  93. /// <summary>Field number for the "Msg" field.</summary>
  94. public const int MsgFieldNumber = 3;
  95. private string msg_ = "";
  96. /// <summary>
  97. /// 消息正文, 客户端自行编码解码
  98. /// </summary>
  99. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  100. public string Msg {
  101. get { return msg_; }
  102. set {
  103. msg_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  104. }
  105. }
  106. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  107. public override bool Equals(object other) {
  108. return Equals(other as ChatNotify);
  109. }
  110. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  111. public bool Equals(ChatNotify other) {
  112. if (ReferenceEquals(other, null)) {
  113. return false;
  114. }
  115. if (ReferenceEquals(other, this)) {
  116. return true;
  117. }
  118. if (Type != other.Type) return false;
  119. if (Target != other.Target) return false;
  120. if (Msg != other.Msg) return false;
  121. return true;
  122. }
  123. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  124. public override int GetHashCode() {
  125. int hash = 1;
  126. if (Type != 0) hash ^= Type.GetHashCode();
  127. if (Target != 0UL) hash ^= Target.GetHashCode();
  128. if (Msg.Length != 0) hash ^= Msg.GetHashCode();
  129. return hash;
  130. }
  131. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  132. public override string ToString() {
  133. return pb::JsonFormatter.ToDiagnosticString(this);
  134. }
  135. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  136. public void WriteTo(pb::CodedOutputStream output) {
  137. if (Type != 0) {
  138. output.WriteRawTag(8);
  139. output.WriteUInt32(Type);
  140. }
  141. if (Target != 0UL) {
  142. output.WriteRawTag(16);
  143. output.WriteUInt64(Target);
  144. }
  145. if (Msg.Length != 0) {
  146. output.WriteRawTag(26);
  147. output.WriteString(Msg);
  148. }
  149. }
  150. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  151. public int CalculateSize() {
  152. int size = 0;
  153. if (Type != 0) {
  154. size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Type);
  155. }
  156. if (Target != 0UL) {
  157. size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Target);
  158. }
  159. if (Msg.Length != 0) {
  160. size += 1 + pb::CodedOutputStream.ComputeStringSize(Msg);
  161. }
  162. return size;
  163. }
  164. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  165. public void MergeFrom(ChatNotify other) {
  166. if (other == null) {
  167. return;
  168. }
  169. if (other.Type != 0) {
  170. Type = other.Type;
  171. }
  172. if (other.Target != 0UL) {
  173. Target = other.Target;
  174. }
  175. if (other.Msg.Length != 0) {
  176. Msg = other.Msg;
  177. }
  178. }
  179. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  180. public void MergeFrom(pb::CodedInputStream input) {
  181. uint tag;
  182. while ((tag = input.ReadTag()) != 0) {
  183. switch(tag) {
  184. default:
  185. input.SkipLastField();
  186. break;
  187. case 8: {
  188. Type = input.ReadUInt32();
  189. break;
  190. }
  191. case 16: {
  192. Target = input.ReadUInt64();
  193. break;
  194. }
  195. case 26: {
  196. Msg = input.ReadString();
  197. break;
  198. }
  199. }
  200. }
  201. }
  202. }
  203. public sealed partial class ChatPush : pb::IMessage<ChatPush> {
  204. private static readonly pb::MessageParser<ChatPush> _parser = new pb::MessageParser<ChatPush>(() => new ChatPush());
  205. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  206. public static pb::MessageParser<ChatPush> Parser { get { return _parser; } }
  207. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  208. public static pbr::MessageDescriptor Descriptor {
  209. get { return global::Protos.ChatReflection.Descriptor.MessageTypes[1]; }
  210. }
  211. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  212. pbr::MessageDescriptor pb::IMessage.Descriptor {
  213. get { return Descriptor; }
  214. }
  215. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  216. public ChatPush() {
  217. OnConstruction();
  218. }
  219. partial void OnConstruction();
  220. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  221. public ChatPush(ChatPush other) : this() {
  222. type_ = other.type_;
  223. target_ = other.target_;
  224. msg_ = other.msg_;
  225. Sender = other.sender_ != null ? other.Sender.Clone() : null;
  226. }
  227. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  228. public ChatPush Clone() {
  229. return new ChatPush(this);
  230. }
  231. /// <summary>Field number for the "Type" field.</summary>
  232. public const int TypeFieldNumber = 1;
  233. private uint type_;
  234. /// <summary>
  235. /// 0=世界;1=大厅;2=队伍;3=派对;4=好友(私聊)
  236. /// </summary>
  237. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  238. public uint Type {
  239. get { return type_; }
  240. set {
  241. type_ = value;
  242. }
  243. }
  244. /// <summary>Field number for the "Target" field.</summary>
  245. public const int TargetFieldNumber = 2;
  246. private ulong target_;
  247. /// <summary>
  248. /// 对象id, 对应Type字段的世界id,roomid partyid, 好友id
  249. /// </summary>
  250. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  251. public ulong Target {
  252. get { return target_; }
  253. set {
  254. target_ = value;
  255. }
  256. }
  257. /// <summary>Field number for the "Msg" field.</summary>
  258. public const int MsgFieldNumber = 3;
  259. private string msg_ = "";
  260. /// <summary>
  261. /// 消息正文, 客户端自行编码解码
  262. /// </summary>
  263. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  264. public string Msg {
  265. get { return msg_; }
  266. set {
  267. msg_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  268. }
  269. }
  270. /// <summary>Field number for the "Sender" field.</summary>
  271. public const int SenderFieldNumber = 4;
  272. private global::Protos.UserInfo sender_;
  273. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  274. public global::Protos.UserInfo Sender {
  275. get { return sender_; }
  276. set {
  277. sender_ = value;
  278. }
  279. }
  280. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  281. public override bool Equals(object other) {
  282. return Equals(other as ChatPush);
  283. }
  284. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  285. public bool Equals(ChatPush other) {
  286. if (ReferenceEquals(other, null)) {
  287. return false;
  288. }
  289. if (ReferenceEquals(other, this)) {
  290. return true;
  291. }
  292. if (Type != other.Type) return false;
  293. if (Target != other.Target) return false;
  294. if (Msg != other.Msg) return false;
  295. if (!object.Equals(Sender, other.Sender)) return false;
  296. return true;
  297. }
  298. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  299. public override int GetHashCode() {
  300. int hash = 1;
  301. if (Type != 0) hash ^= Type.GetHashCode();
  302. if (Target != 0UL) hash ^= Target.GetHashCode();
  303. if (Msg.Length != 0) hash ^= Msg.GetHashCode();
  304. if (sender_ != null) hash ^= Sender.GetHashCode();
  305. return hash;
  306. }
  307. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  308. public override string ToString() {
  309. return pb::JsonFormatter.ToDiagnosticString(this);
  310. }
  311. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  312. public void WriteTo(pb::CodedOutputStream output) {
  313. if (Type != 0) {
  314. output.WriteRawTag(8);
  315. output.WriteUInt32(Type);
  316. }
  317. if (Target != 0UL) {
  318. output.WriteRawTag(16);
  319. output.WriteUInt64(Target);
  320. }
  321. if (Msg.Length != 0) {
  322. output.WriteRawTag(26);
  323. output.WriteString(Msg);
  324. }
  325. if (sender_ != null) {
  326. output.WriteRawTag(34);
  327. output.WriteMessage(Sender);
  328. }
  329. }
  330. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  331. public int CalculateSize() {
  332. int size = 0;
  333. if (Type != 0) {
  334. size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Type);
  335. }
  336. if (Target != 0UL) {
  337. size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Target);
  338. }
  339. if (Msg.Length != 0) {
  340. size += 1 + pb::CodedOutputStream.ComputeStringSize(Msg);
  341. }
  342. if (sender_ != null) {
  343. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Sender);
  344. }
  345. return size;
  346. }
  347. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  348. public void MergeFrom(ChatPush other) {
  349. if (other == null) {
  350. return;
  351. }
  352. if (other.Type != 0) {
  353. Type = other.Type;
  354. }
  355. if (other.Target != 0UL) {
  356. Target = other.Target;
  357. }
  358. if (other.Msg.Length != 0) {
  359. Msg = other.Msg;
  360. }
  361. if (other.sender_ != null) {
  362. if (sender_ == null) {
  363. sender_ = new global::Protos.UserInfo();
  364. }
  365. Sender.MergeFrom(other.Sender);
  366. }
  367. }
  368. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  369. public void MergeFrom(pb::CodedInputStream input) {
  370. uint tag;
  371. while ((tag = input.ReadTag()) != 0) {
  372. switch(tag) {
  373. default:
  374. input.SkipLastField();
  375. break;
  376. case 8: {
  377. Type = input.ReadUInt32();
  378. break;
  379. }
  380. case 16: {
  381. Target = input.ReadUInt64();
  382. break;
  383. }
  384. case 26: {
  385. Msg = input.ReadString();
  386. break;
  387. }
  388. case 34: {
  389. if (sender_ == null) {
  390. sender_ = new global::Protos.UserInfo();
  391. }
  392. input.ReadMessage(sender_);
  393. break;
  394. }
  395. }
  396. }
  397. }
  398. }
  399. public sealed partial class SwitchWorldRequest : pb::IMessage<SwitchWorldRequest> {
  400. private static readonly pb::MessageParser<SwitchWorldRequest> _parser = new pb::MessageParser<SwitchWorldRequest>(() => new SwitchWorldRequest());
  401. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  402. public static pb::MessageParser<SwitchWorldRequest> Parser { get { return _parser; } }
  403. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  404. public static pbr::MessageDescriptor Descriptor {
  405. get { return global::Protos.ChatReflection.Descriptor.MessageTypes[2]; }
  406. }
  407. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  408. pbr::MessageDescriptor pb::IMessage.Descriptor {
  409. get { return Descriptor; }
  410. }
  411. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  412. public SwitchWorldRequest() {
  413. OnConstruction();
  414. }
  415. partial void OnConstruction();
  416. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  417. public SwitchWorldRequest(SwitchWorldRequest other) : this() {
  418. worldID_ = other.worldID_;
  419. }
  420. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  421. public SwitchWorldRequest Clone() {
  422. return new SwitchWorldRequest(this);
  423. }
  424. /// <summary>Field number for the "WorldID" field.</summary>
  425. public const int WorldIDFieldNumber = 1;
  426. private uint worldID_;
  427. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  428. public uint WorldID {
  429. get { return worldID_; }
  430. set {
  431. worldID_ = value;
  432. }
  433. }
  434. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  435. public override bool Equals(object other) {
  436. return Equals(other as SwitchWorldRequest);
  437. }
  438. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  439. public bool Equals(SwitchWorldRequest other) {
  440. if (ReferenceEquals(other, null)) {
  441. return false;
  442. }
  443. if (ReferenceEquals(other, this)) {
  444. return true;
  445. }
  446. if (WorldID != other.WorldID) return false;
  447. return true;
  448. }
  449. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  450. public override int GetHashCode() {
  451. int hash = 1;
  452. if (WorldID != 0) hash ^= WorldID.GetHashCode();
  453. return hash;
  454. }
  455. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  456. public override string ToString() {
  457. return pb::JsonFormatter.ToDiagnosticString(this);
  458. }
  459. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  460. public void WriteTo(pb::CodedOutputStream output) {
  461. if (WorldID != 0) {
  462. output.WriteRawTag(8);
  463. output.WriteUInt32(WorldID);
  464. }
  465. }
  466. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  467. public int CalculateSize() {
  468. int size = 0;
  469. if (WorldID != 0) {
  470. size += 1 + pb::CodedOutputStream.ComputeUInt32Size(WorldID);
  471. }
  472. return size;
  473. }
  474. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  475. public void MergeFrom(SwitchWorldRequest other) {
  476. if (other == null) {
  477. return;
  478. }
  479. if (other.WorldID != 0) {
  480. WorldID = other.WorldID;
  481. }
  482. }
  483. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  484. public void MergeFrom(pb::CodedInputStream input) {
  485. uint tag;
  486. while ((tag = input.ReadTag()) != 0) {
  487. switch(tag) {
  488. default:
  489. input.SkipLastField();
  490. break;
  491. case 8: {
  492. WorldID = input.ReadUInt32();
  493. break;
  494. }
  495. }
  496. }
  497. }
  498. }
  499. public sealed partial class SwitchWorldResponse : pb::IMessage<SwitchWorldResponse> {
  500. private static readonly pb::MessageParser<SwitchWorldResponse> _parser = new pb::MessageParser<SwitchWorldResponse>(() => new SwitchWorldResponse());
  501. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  502. public static pb::MessageParser<SwitchWorldResponse> Parser { get { return _parser; } }
  503. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  504. public static pbr::MessageDescriptor Descriptor {
  505. get { return global::Protos.ChatReflection.Descriptor.MessageTypes[3]; }
  506. }
  507. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  508. pbr::MessageDescriptor pb::IMessage.Descriptor {
  509. get { return Descriptor; }
  510. }
  511. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  512. public SwitchWorldResponse() {
  513. OnConstruction();
  514. }
  515. partial void OnConstruction();
  516. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  517. public SwitchWorldResponse(SwitchWorldResponse other) : this() {
  518. Result = other.result_ != null ? other.Result.Clone() : null;
  519. }
  520. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  521. public SwitchWorldResponse Clone() {
  522. return new SwitchWorldResponse(this);
  523. }
  524. /// <summary>Field number for the "Result" field.</summary>
  525. public const int ResultFieldNumber = 1;
  526. private global::Protos.Result result_;
  527. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  528. public global::Protos.Result Result {
  529. get { return result_; }
  530. set {
  531. result_ = value;
  532. }
  533. }
  534. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  535. public override bool Equals(object other) {
  536. return Equals(other as SwitchWorldResponse);
  537. }
  538. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  539. public bool Equals(SwitchWorldResponse other) {
  540. if (ReferenceEquals(other, null)) {
  541. return false;
  542. }
  543. if (ReferenceEquals(other, this)) {
  544. return true;
  545. }
  546. if (!object.Equals(Result, other.Result)) return false;
  547. return true;
  548. }
  549. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  550. public override int GetHashCode() {
  551. int hash = 1;
  552. if (result_ != null) hash ^= Result.GetHashCode();
  553. return hash;
  554. }
  555. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  556. public override string ToString() {
  557. return pb::JsonFormatter.ToDiagnosticString(this);
  558. }
  559. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  560. public void WriteTo(pb::CodedOutputStream output) {
  561. if (result_ != null) {
  562. output.WriteRawTag(10);
  563. output.WriteMessage(Result);
  564. }
  565. }
  566. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  567. public int CalculateSize() {
  568. int size = 0;
  569. if (result_ != null) {
  570. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Result);
  571. }
  572. return size;
  573. }
  574. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  575. public void MergeFrom(SwitchWorldResponse other) {
  576. if (other == null) {
  577. return;
  578. }
  579. if (other.result_ != null) {
  580. if (result_ == null) {
  581. result_ = new global::Protos.Result();
  582. }
  583. Result.MergeFrom(other.Result);
  584. }
  585. }
  586. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  587. public void MergeFrom(pb::CodedInputStream input) {
  588. uint tag;
  589. while ((tag = input.ReadTag()) != 0) {
  590. switch(tag) {
  591. default:
  592. input.SkipLastField();
  593. break;
  594. case 10: {
  595. if (result_ == null) {
  596. result_ = new global::Protos.Result();
  597. }
  598. input.ReadMessage(result_);
  599. break;
  600. }
  601. }
  602. }
  603. }
  604. }
  605. #endregion
  606. }
  607. #endregion Designer generated code