Chat.cs 24 KB

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