Chat.cs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: pb/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 Chat {
  10. /// <summary>Holder for reflection information generated from pb/chat.proto</summary>
  11. public static partial class ChatReflection {
  12. #region Descriptor
  13. /// <summary>File descriptor for pb/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. "Cg1wYi9jaGF0LnByb3RvEgRDaGF0IjkKDENTX0NoYXRMb2dpbhIOCgZab25l",
  22. "aWQYASABKAUSCwoDVWlkGAIgASgJEgwKBE5hbWUYAyABKAkiQwoOQ1NfQ2hh",
  23. "dFNlbmRNc2cSJAoJVG9DaGFubmVsGAEgASgOMhEuQ2hhdC5DaGF0Q2hhbm5l",
  24. "bBILCgNNc2cYAiABKAkiggEKDFNDX0NoYXRMb2dpbhIqCgRjb2RlGAEgASgO",
  25. "MhwuQ2hhdC5TQ19DaGF0TG9naW4uRXJyb3JDb2RlIkYKCUVycm9yQ29kZRIG",
  26. "CgJPSxAAEhAKDEFjY0lESW52YWxpZBABEg8KC0xvZ2luUmVwZWF0EAISDgoK",
  27. "SW5uZXJFcnJvchADIlgKDVNDX0NoYXROZXdNc2cSJgoLRnJvbUNoYW5uZWwY",
  28. "ASABKA4yES5DaGF0LkNoYXRDaGFubmVsEgsKA01zZxgCIAEoCRISCgpTZW5k",
  29. "ZXJOYW1lGAMgASgJKi8KC0NoYXRDaGFubmVsEgoKBlN5c3RlbRAAEgkKBVdv",
  30. "cmxkEAESCQoFR3VpbGQQAmIGcHJvdG8z"));
  31. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  32. new pbr::FileDescriptor[] { },
  33. new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Chat.ChatChannel), }, new pbr::GeneratedClrTypeInfo[] {
  34. new pbr::GeneratedClrTypeInfo(typeof(global::Chat.CS_ChatLogin), global::Chat.CS_ChatLogin.Parser, new[]{ "Zoneid", "Uid", "Name" }, null, null, null),
  35. new pbr::GeneratedClrTypeInfo(typeof(global::Chat.CS_ChatSendMsg), global::Chat.CS_ChatSendMsg.Parser, new[]{ "ToChannel", "Msg" }, null, null, null),
  36. new pbr::GeneratedClrTypeInfo(typeof(global::Chat.SC_ChatLogin), global::Chat.SC_ChatLogin.Parser, new[]{ "Code" }, null, new[]{ typeof(global::Chat.SC_ChatLogin.Types.ErrorCode) }, null),
  37. new pbr::GeneratedClrTypeInfo(typeof(global::Chat.SC_ChatNewMsg), global::Chat.SC_ChatNewMsg.Parser, new[]{ "FromChannel", "Msg", "SenderName" }, null, null, null)
  38. }));
  39. }
  40. #endregion
  41. }
  42. #region Enums
  43. /// <summary>
  44. /// 频道
  45. /// </summary>
  46. public enum ChatChannel {
  47. /// <summary>
  48. /// 系统频道
  49. /// </summary>
  50. [pbr::OriginalName("System")] System = 0,
  51. /// <summary>
  52. /// 世界频道
  53. /// </summary>
  54. [pbr::OriginalName("World")] World = 1,
  55. /// <summary>
  56. /// 公会频道
  57. /// </summary>
  58. [pbr::OriginalName("Guild")] Guild = 2,
  59. }
  60. #endregion
  61. #region Messages
  62. /// <summary>
  63. /// 聊天, 登录
  64. /// </summary>
  65. public sealed partial class CS_ChatLogin : pb::IMessage<CS_ChatLogin> {
  66. private static readonly pb::MessageParser<CS_ChatLogin> _parser = new pb::MessageParser<CS_ChatLogin>(() => new CS_ChatLogin());
  67. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  68. public static pb::MessageParser<CS_ChatLogin> Parser { get { return _parser; } }
  69. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  70. public static pbr::MessageDescriptor Descriptor {
  71. get { return global::Chat.ChatReflection.Descriptor.MessageTypes[0]; }
  72. }
  73. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  74. pbr::MessageDescriptor pb::IMessage.Descriptor {
  75. get { return Descriptor; }
  76. }
  77. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  78. public CS_ChatLogin() {
  79. OnConstruction();
  80. }
  81. partial void OnConstruction();
  82. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  83. public CS_ChatLogin(CS_ChatLogin other) : this() {
  84. zoneid_ = other.zoneid_;
  85. uid_ = other.uid_;
  86. name_ = other.name_;
  87. }
  88. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  89. public CS_ChatLogin Clone() {
  90. return new CS_ChatLogin(this);
  91. }
  92. /// <summary>Field number for the "Zoneid" field.</summary>
  93. public const int ZoneidFieldNumber = 1;
  94. private int zoneid_;
  95. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  96. public int Zoneid {
  97. get { return zoneid_; }
  98. set {
  99. zoneid_ = value;
  100. }
  101. }
  102. /// <summary>Field number for the "Uid" field.</summary>
  103. public const int UidFieldNumber = 2;
  104. private string uid_ = "";
  105. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  106. public string Uid {
  107. get { return uid_; }
  108. set {
  109. uid_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  110. }
  111. }
  112. /// <summary>Field number for the "Name" field.</summary>
  113. public const int NameFieldNumber = 3;
  114. private string name_ = "";
  115. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  116. public string Name {
  117. get { return name_; }
  118. set {
  119. name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  120. }
  121. }
  122. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  123. public override bool Equals(object other) {
  124. return Equals(other as CS_ChatLogin);
  125. }
  126. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  127. public bool Equals(CS_ChatLogin other) {
  128. if (ReferenceEquals(other, null)) {
  129. return false;
  130. }
  131. if (ReferenceEquals(other, this)) {
  132. return true;
  133. }
  134. if (Zoneid != other.Zoneid) return false;
  135. if (Uid != other.Uid) return false;
  136. if (Name != other.Name) return false;
  137. return true;
  138. }
  139. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  140. public override int GetHashCode() {
  141. int hash = 1;
  142. if (Zoneid != 0) hash ^= Zoneid.GetHashCode();
  143. if (Uid.Length != 0) hash ^= Uid.GetHashCode();
  144. if (Name.Length != 0) hash ^= Name.GetHashCode();
  145. return hash;
  146. }
  147. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  148. public override string ToString() {
  149. return pb::JsonFormatter.ToDiagnosticString(this);
  150. }
  151. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  152. public void WriteTo(pb::CodedOutputStream output) {
  153. if (Zoneid != 0) {
  154. output.WriteRawTag(8);
  155. output.WriteInt32(Zoneid);
  156. }
  157. if (Uid.Length != 0) {
  158. output.WriteRawTag(18);
  159. output.WriteString(Uid);
  160. }
  161. if (Name.Length != 0) {
  162. output.WriteRawTag(26);
  163. output.WriteString(Name);
  164. }
  165. }
  166. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  167. public int CalculateSize() {
  168. int size = 0;
  169. if (Zoneid != 0) {
  170. size += 1 + pb::CodedOutputStream.ComputeInt32Size(Zoneid);
  171. }
  172. if (Uid.Length != 0) {
  173. size += 1 + pb::CodedOutputStream.ComputeStringSize(Uid);
  174. }
  175. if (Name.Length != 0) {
  176. size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
  177. }
  178. return size;
  179. }
  180. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  181. public void MergeFrom(CS_ChatLogin other) {
  182. if (other == null) {
  183. return;
  184. }
  185. if (other.Zoneid != 0) {
  186. Zoneid = other.Zoneid;
  187. }
  188. if (other.Uid.Length != 0) {
  189. Uid = other.Uid;
  190. }
  191. if (other.Name.Length != 0) {
  192. Name = other.Name;
  193. }
  194. }
  195. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  196. public void MergeFrom(pb::CodedInputStream input) {
  197. uint tag;
  198. while ((tag = input.ReadTag()) != 0) {
  199. switch(tag) {
  200. default:
  201. input.SkipLastField();
  202. break;
  203. case 8: {
  204. Zoneid = input.ReadInt32();
  205. break;
  206. }
  207. case 18: {
  208. Uid = input.ReadString();
  209. break;
  210. }
  211. case 26: {
  212. Name = input.ReadString();
  213. break;
  214. }
  215. }
  216. }
  217. }
  218. }
  219. /// <summary>
  220. /// 聊天, 发送消息
  221. /// </summary>
  222. public sealed partial class CS_ChatSendMsg : pb::IMessage<CS_ChatSendMsg> {
  223. private static readonly pb::MessageParser<CS_ChatSendMsg> _parser = new pb::MessageParser<CS_ChatSendMsg>(() => new CS_ChatSendMsg());
  224. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  225. public static pb::MessageParser<CS_ChatSendMsg> Parser { get { return _parser; } }
  226. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  227. public static pbr::MessageDescriptor Descriptor {
  228. get { return global::Chat.ChatReflection.Descriptor.MessageTypes[1]; }
  229. }
  230. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  231. pbr::MessageDescriptor pb::IMessage.Descriptor {
  232. get { return Descriptor; }
  233. }
  234. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  235. public CS_ChatSendMsg() {
  236. OnConstruction();
  237. }
  238. partial void OnConstruction();
  239. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  240. public CS_ChatSendMsg(CS_ChatSendMsg other) : this() {
  241. toChannel_ = other.toChannel_;
  242. msg_ = other.msg_;
  243. }
  244. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  245. public CS_ChatSendMsg Clone() {
  246. return new CS_ChatSendMsg(this);
  247. }
  248. /// <summary>Field number for the "ToChannel" field.</summary>
  249. public const int ToChannelFieldNumber = 1;
  250. private global::Chat.ChatChannel toChannel_ = 0;
  251. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  252. public global::Chat.ChatChannel ToChannel {
  253. get { return toChannel_; }
  254. set {
  255. toChannel_ = value;
  256. }
  257. }
  258. /// <summary>Field number for the "Msg" field.</summary>
  259. public const int MsgFieldNumber = 2;
  260. private string msg_ = "";
  261. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  262. public string Msg {
  263. get { return msg_; }
  264. set {
  265. msg_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  266. }
  267. }
  268. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  269. public override bool Equals(object other) {
  270. return Equals(other as CS_ChatSendMsg);
  271. }
  272. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  273. public bool Equals(CS_ChatSendMsg other) {
  274. if (ReferenceEquals(other, null)) {
  275. return false;
  276. }
  277. if (ReferenceEquals(other, this)) {
  278. return true;
  279. }
  280. if (ToChannel != other.ToChannel) return false;
  281. if (Msg != other.Msg) return false;
  282. return true;
  283. }
  284. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  285. public override int GetHashCode() {
  286. int hash = 1;
  287. if (ToChannel != 0) hash ^= ToChannel.GetHashCode();
  288. if (Msg.Length != 0) hash ^= Msg.GetHashCode();
  289. return hash;
  290. }
  291. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  292. public override string ToString() {
  293. return pb::JsonFormatter.ToDiagnosticString(this);
  294. }
  295. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  296. public void WriteTo(pb::CodedOutputStream output) {
  297. if (ToChannel != 0) {
  298. output.WriteRawTag(8);
  299. output.WriteEnum((int) ToChannel);
  300. }
  301. if (Msg.Length != 0) {
  302. output.WriteRawTag(18);
  303. output.WriteString(Msg);
  304. }
  305. }
  306. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  307. public int CalculateSize() {
  308. int size = 0;
  309. if (ToChannel != 0) {
  310. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ToChannel);
  311. }
  312. if (Msg.Length != 0) {
  313. size += 1 + pb::CodedOutputStream.ComputeStringSize(Msg);
  314. }
  315. return size;
  316. }
  317. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  318. public void MergeFrom(CS_ChatSendMsg other) {
  319. if (other == null) {
  320. return;
  321. }
  322. if (other.ToChannel != 0) {
  323. ToChannel = other.ToChannel;
  324. }
  325. if (other.Msg.Length != 0) {
  326. Msg = other.Msg;
  327. }
  328. }
  329. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  330. public void MergeFrom(pb::CodedInputStream input) {
  331. uint tag;
  332. while ((tag = input.ReadTag()) != 0) {
  333. switch(tag) {
  334. default:
  335. input.SkipLastField();
  336. break;
  337. case 8: {
  338. toChannel_ = (global::Chat.ChatChannel) input.ReadEnum();
  339. break;
  340. }
  341. case 18: {
  342. Msg = input.ReadString();
  343. break;
  344. }
  345. }
  346. }
  347. }
  348. }
  349. /// <summary>
  350. /// 聊天, 初始化返回值
  351. /// </summary>
  352. public sealed partial class SC_ChatLogin : pb::IMessage<SC_ChatLogin> {
  353. private static readonly pb::MessageParser<SC_ChatLogin> _parser = new pb::MessageParser<SC_ChatLogin>(() => new SC_ChatLogin());
  354. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  355. public static pb::MessageParser<SC_ChatLogin> Parser { get { return _parser; } }
  356. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  357. public static pbr::MessageDescriptor Descriptor {
  358. get { return global::Chat.ChatReflection.Descriptor.MessageTypes[2]; }
  359. }
  360. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  361. pbr::MessageDescriptor pb::IMessage.Descriptor {
  362. get { return Descriptor; }
  363. }
  364. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  365. public SC_ChatLogin() {
  366. OnConstruction();
  367. }
  368. partial void OnConstruction();
  369. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  370. public SC_ChatLogin(SC_ChatLogin other) : this() {
  371. code_ = other.code_;
  372. }
  373. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  374. public SC_ChatLogin Clone() {
  375. return new SC_ChatLogin(this);
  376. }
  377. /// <summary>Field number for the "code" field.</summary>
  378. public const int CodeFieldNumber = 1;
  379. private global::Chat.SC_ChatLogin.Types.ErrorCode code_ = 0;
  380. /// <summary>
  381. /// 错误码
  382. /// </summary>
  383. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  384. public global::Chat.SC_ChatLogin.Types.ErrorCode Code {
  385. get { return code_; }
  386. set {
  387. code_ = value;
  388. }
  389. }
  390. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  391. public override bool Equals(object other) {
  392. return Equals(other as SC_ChatLogin);
  393. }
  394. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  395. public bool Equals(SC_ChatLogin other) {
  396. if (ReferenceEquals(other, null)) {
  397. return false;
  398. }
  399. if (ReferenceEquals(other, this)) {
  400. return true;
  401. }
  402. if (Code != other.Code) return false;
  403. return true;
  404. }
  405. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  406. public override int GetHashCode() {
  407. int hash = 1;
  408. if (Code != 0) hash ^= Code.GetHashCode();
  409. return hash;
  410. }
  411. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  412. public override string ToString() {
  413. return pb::JsonFormatter.ToDiagnosticString(this);
  414. }
  415. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  416. public void WriteTo(pb::CodedOutputStream output) {
  417. if (Code != 0) {
  418. output.WriteRawTag(8);
  419. output.WriteEnum((int) Code);
  420. }
  421. }
  422. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  423. public int CalculateSize() {
  424. int size = 0;
  425. if (Code != 0) {
  426. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Code);
  427. }
  428. return size;
  429. }
  430. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  431. public void MergeFrom(SC_ChatLogin other) {
  432. if (other == null) {
  433. return;
  434. }
  435. if (other.Code != 0) {
  436. Code = other.Code;
  437. }
  438. }
  439. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  440. public void MergeFrom(pb::CodedInputStream input) {
  441. uint tag;
  442. while ((tag = input.ReadTag()) != 0) {
  443. switch(tag) {
  444. default:
  445. input.SkipLastField();
  446. break;
  447. case 8: {
  448. code_ = (global::Chat.SC_ChatLogin.Types.ErrorCode) input.ReadEnum();
  449. break;
  450. }
  451. }
  452. }
  453. }
  454. #region Nested types
  455. /// <summary>Container for nested types declared in the SC_ChatLogin message type.</summary>
  456. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  457. public static partial class Types {
  458. /// <summary>
  459. /// 错误码
  460. /// </summary>
  461. public enum ErrorCode {
  462. /// <summary>
  463. /// 成功
  464. /// </summary>
  465. [pbr::OriginalName("OK")] Ok = 0,
  466. /// <summary>
  467. /// 未知的UID
  468. /// </summary>
  469. [pbr::OriginalName("AccIDInvalid")] AccIdinvalid = 1,
  470. /// <summary>
  471. /// 重复登入
  472. /// </summary>
  473. [pbr::OriginalName("LoginRepeat")] LoginRepeat = 2,
  474. /// <summary>
  475. /// 内部错误
  476. /// </summary>
  477. [pbr::OriginalName("InnerError")] InnerError = 3,
  478. }
  479. }
  480. #endregion
  481. }
  482. /// <summary>
  483. /// 聊天, 新的消息
  484. /// </summary>
  485. public sealed partial class SC_ChatNewMsg : pb::IMessage<SC_ChatNewMsg> {
  486. private static readonly pb::MessageParser<SC_ChatNewMsg> _parser = new pb::MessageParser<SC_ChatNewMsg>(() => new SC_ChatNewMsg());
  487. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  488. public static pb::MessageParser<SC_ChatNewMsg> Parser { get { return _parser; } }
  489. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  490. public static pbr::MessageDescriptor Descriptor {
  491. get { return global::Chat.ChatReflection.Descriptor.MessageTypes[3]; }
  492. }
  493. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  494. pbr::MessageDescriptor pb::IMessage.Descriptor {
  495. get { return Descriptor; }
  496. }
  497. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  498. public SC_ChatNewMsg() {
  499. OnConstruction();
  500. }
  501. partial void OnConstruction();
  502. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  503. public SC_ChatNewMsg(SC_ChatNewMsg other) : this() {
  504. fromChannel_ = other.fromChannel_;
  505. msg_ = other.msg_;
  506. senderName_ = other.senderName_;
  507. }
  508. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  509. public SC_ChatNewMsg Clone() {
  510. return new SC_ChatNewMsg(this);
  511. }
  512. /// <summary>Field number for the "FromChannel" field.</summary>
  513. public const int FromChannelFieldNumber = 1;
  514. private global::Chat.ChatChannel fromChannel_ = 0;
  515. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  516. public global::Chat.ChatChannel FromChannel {
  517. get { return fromChannel_; }
  518. set {
  519. fromChannel_ = value;
  520. }
  521. }
  522. /// <summary>Field number for the "Msg" field.</summary>
  523. public const int MsgFieldNumber = 2;
  524. private string msg_ = "";
  525. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  526. public string Msg {
  527. get { return msg_; }
  528. set {
  529. msg_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  530. }
  531. }
  532. /// <summary>Field number for the "SenderName" field.</summary>
  533. public const int SenderNameFieldNumber = 3;
  534. private string senderName_ = "";
  535. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  536. public string SenderName {
  537. get { return senderName_; }
  538. set {
  539. senderName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  540. }
  541. }
  542. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  543. public override bool Equals(object other) {
  544. return Equals(other as SC_ChatNewMsg);
  545. }
  546. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  547. public bool Equals(SC_ChatNewMsg other) {
  548. if (ReferenceEquals(other, null)) {
  549. return false;
  550. }
  551. if (ReferenceEquals(other, this)) {
  552. return true;
  553. }
  554. if (FromChannel != other.FromChannel) return false;
  555. if (Msg != other.Msg) return false;
  556. if (SenderName != other.SenderName) return false;
  557. return true;
  558. }
  559. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  560. public override int GetHashCode() {
  561. int hash = 1;
  562. if (FromChannel != 0) hash ^= FromChannel.GetHashCode();
  563. if (Msg.Length != 0) hash ^= Msg.GetHashCode();
  564. if (SenderName.Length != 0) hash ^= SenderName.GetHashCode();
  565. return hash;
  566. }
  567. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  568. public override string ToString() {
  569. return pb::JsonFormatter.ToDiagnosticString(this);
  570. }
  571. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  572. public void WriteTo(pb::CodedOutputStream output) {
  573. if (FromChannel != 0) {
  574. output.WriteRawTag(8);
  575. output.WriteEnum((int) FromChannel);
  576. }
  577. if (Msg.Length != 0) {
  578. output.WriteRawTag(18);
  579. output.WriteString(Msg);
  580. }
  581. if (SenderName.Length != 0) {
  582. output.WriteRawTag(26);
  583. output.WriteString(SenderName);
  584. }
  585. }
  586. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  587. public int CalculateSize() {
  588. int size = 0;
  589. if (FromChannel != 0) {
  590. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) FromChannel);
  591. }
  592. if (Msg.Length != 0) {
  593. size += 1 + pb::CodedOutputStream.ComputeStringSize(Msg);
  594. }
  595. if (SenderName.Length != 0) {
  596. size += 1 + pb::CodedOutputStream.ComputeStringSize(SenderName);
  597. }
  598. return size;
  599. }
  600. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  601. public void MergeFrom(SC_ChatNewMsg other) {
  602. if (other == null) {
  603. return;
  604. }
  605. if (other.FromChannel != 0) {
  606. FromChannel = other.FromChannel;
  607. }
  608. if (other.Msg.Length != 0) {
  609. Msg = other.Msg;
  610. }
  611. if (other.SenderName.Length != 0) {
  612. SenderName = other.SenderName;
  613. }
  614. }
  615. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  616. public void MergeFrom(pb::CodedInputStream input) {
  617. uint tag;
  618. while ((tag = input.ReadTag()) != 0) {
  619. switch(tag) {
  620. default:
  621. input.SkipLastField();
  622. break;
  623. case 8: {
  624. fromChannel_ = (global::Chat.ChatChannel) input.ReadEnum();
  625. break;
  626. }
  627. case 18: {
  628. Msg = input.ReadString();
  629. break;
  630. }
  631. case 26: {
  632. SenderName = input.ReadString();
  633. break;
  634. }
  635. }
  636. }
  637. }
  638. }
  639. #endregion
  640. }
  641. #endregion Designer generated code