Sync.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: sync.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 sync.proto</summary>
  11. public static partial class SyncReflection {
  12. #region Descriptor
  13. /// <summary>File descriptor for sync.proto</summary>
  14. public static pbr::FileDescriptor Descriptor {
  15. get { return descriptor; }
  16. }
  17. private static pbr::FileDescriptor descriptor;
  18. static SyncReflection() {
  19. byte[] descriptorData = global::System.Convert.FromBase64String(
  20. string.Concat(
  21. "CgpzeW5jLnByb3RvEgZwcm90b3MaDnVzZXJpbmZvLnByb3RvIhAKDlJlc3Rv",
  22. "cmVSZXF1ZXN0IqQBCg9SZXN0b3JlUmVzcG9uc2USHwoFVXNlcnMYASADKAsy",
  23. "EC5wcm90b3MuVXNlckluZm8SDAoEU3RlcBgCIAEoAxIzCgZWYWx1ZXMYAyAD",
  24. "KAsyIy5wcm90b3MuUmVzdG9yZVJlc3BvbnNlLlZhbHVlc0VudHJ5Gi0KC1Zh",
  25. "bHVlc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoDDoCOAEiewoL",
  26. "U3luY1JlcXVlc3QSDAoEU3RlcBgBIAEoAxIvCgZWYWx1ZXMYAiADKAsyHy5w",
  27. "cm90b3MuU3luY1JlcXVlc3QuVmFsdWVzRW50cnkaLQoLVmFsdWVzRW50cnkS",
  28. "CwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgMOgI4ASKNAQoMU3luY1Jlc3Bv",
  29. "bnNlEg4KBlN0YXR1cxgBIAEoCBIMCgRTdGVwGAIgASgDEjAKBlZhbHVlcxgD",
  30. "IAMoCzIgLnByb3Rvcy5TeW5jUmVzcG9uc2UuVmFsdWVzRW50cnkaLQoLVmFs",
  31. "dWVzRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgMOgI4ASJ1CghT",
  32. "eW5jUHVzaBIMCgRTdGVwGAEgASgDEiwKBlZhbHVlcxgCIAMoCzIcLnByb3Rv",
  33. "cy5TeW5jUHVzaC5WYWx1ZXNFbnRyeRotCgtWYWx1ZXNFbnRyeRILCgNrZXkY",
  34. "ASABKAkSDQoFdmFsdWUYAiABKAw6AjgBYgZwcm90bzM="));
  35. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  36. new pbr::FileDescriptor[] { global::Protos.UserinfoReflection.Descriptor, },
  37. new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
  38. new pbr::GeneratedClrTypeInfo(typeof(global::Protos.RestoreRequest), global::Protos.RestoreRequest.Parser, null, null, null, null),
  39. new pbr::GeneratedClrTypeInfo(typeof(global::Protos.RestoreResponse), global::Protos.RestoreResponse.Parser, new[]{ "Users", "Step", "Values" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
  40. new pbr::GeneratedClrTypeInfo(typeof(global::Protos.SyncRequest), global::Protos.SyncRequest.Parser, new[]{ "Step", "Values" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
  41. new pbr::GeneratedClrTypeInfo(typeof(global::Protos.SyncResponse), global::Protos.SyncResponse.Parser, new[]{ "Status", "Step", "Values" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
  42. new pbr::GeneratedClrTypeInfo(typeof(global::Protos.SyncPush), global::Protos.SyncPush.Parser, new[]{ "Step", "Values" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, })
  43. }));
  44. }
  45. #endregion
  46. }
  47. #region Messages
  48. /// <summary>
  49. /// 载入游戏请求
  50. /// </summary>
  51. public sealed partial class RestoreRequest : pb::IMessage<RestoreRequest> {
  52. private static readonly pb::MessageParser<RestoreRequest> _parser = new pb::MessageParser<RestoreRequest>(() => new RestoreRequest());
  53. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  54. public static pb::MessageParser<RestoreRequest> Parser { get { return _parser; } }
  55. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  56. public static pbr::MessageDescriptor Descriptor {
  57. get { return global::Protos.SyncReflection.Descriptor.MessageTypes[0]; }
  58. }
  59. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  60. pbr::MessageDescriptor pb::IMessage.Descriptor {
  61. get { return Descriptor; }
  62. }
  63. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  64. public RestoreRequest() {
  65. OnConstruction();
  66. }
  67. partial void OnConstruction();
  68. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  69. public RestoreRequest(RestoreRequest other) : this() {
  70. }
  71. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  72. public RestoreRequest Clone() {
  73. return new RestoreRequest(this);
  74. }
  75. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  76. public override bool Equals(object other) {
  77. return Equals(other as RestoreRequest);
  78. }
  79. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  80. public bool Equals(RestoreRequest other) {
  81. if (ReferenceEquals(other, null)) {
  82. return false;
  83. }
  84. if (ReferenceEquals(other, this)) {
  85. return true;
  86. }
  87. return true;
  88. }
  89. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  90. public override int GetHashCode() {
  91. int hash = 1;
  92. return hash;
  93. }
  94. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  95. public override string ToString() {
  96. return pb::JsonFormatter.ToDiagnosticString(this);
  97. }
  98. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  99. public void WriteTo(pb::CodedOutputStream output) {
  100. }
  101. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  102. public int CalculateSize() {
  103. int size = 0;
  104. return size;
  105. }
  106. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  107. public void MergeFrom(RestoreRequest other) {
  108. if (other == null) {
  109. return;
  110. }
  111. }
  112. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  113. public void MergeFrom(pb::CodedInputStream input) {
  114. uint tag;
  115. while ((tag = input.ReadTag()) != 0) {
  116. switch(tag) {
  117. default:
  118. input.SkipLastField();
  119. break;
  120. }
  121. }
  122. }
  123. }
  124. /// <summary>
  125. /// 载入游戏响应
  126. /// </summary>
  127. public sealed partial class RestoreResponse : pb::IMessage<RestoreResponse> {
  128. private static readonly pb::MessageParser<RestoreResponse> _parser = new pb::MessageParser<RestoreResponse>(() => new RestoreResponse());
  129. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  130. public static pb::MessageParser<RestoreResponse> Parser { get { return _parser; } }
  131. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  132. public static pbr::MessageDescriptor Descriptor {
  133. get { return global::Protos.SyncReflection.Descriptor.MessageTypes[1]; }
  134. }
  135. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  136. pbr::MessageDescriptor pb::IMessage.Descriptor {
  137. get { return Descriptor; }
  138. }
  139. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  140. public RestoreResponse() {
  141. OnConstruction();
  142. }
  143. partial void OnConstruction();
  144. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  145. public RestoreResponse(RestoreResponse other) : this() {
  146. users_ = other.users_.Clone();
  147. step_ = other.step_;
  148. values_ = other.values_.Clone();
  149. }
  150. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  151. public RestoreResponse Clone() {
  152. return new RestoreResponse(this);
  153. }
  154. /// <summary>Field number for the "Users" field.</summary>
  155. public const int UsersFieldNumber = 1;
  156. private static readonly pb::FieldCodec<global::Protos.UserInfo> _repeated_users_codec
  157. = pb::FieldCodec.ForMessage(10, global::Protos.UserInfo.Parser);
  158. private readonly pbc::RepeatedField<global::Protos.UserInfo> users_ = new pbc::RepeatedField<global::Protos.UserInfo>();
  159. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  160. public pbc::RepeatedField<global::Protos.UserInfo> Users {
  161. get { return users_; }
  162. }
  163. /// <summary>Field number for the "Step" field.</summary>
  164. public const int StepFieldNumber = 2;
  165. private long step_;
  166. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  167. public long Step {
  168. get { return step_; }
  169. set {
  170. step_ = value;
  171. }
  172. }
  173. /// <summary>Field number for the "Values" field.</summary>
  174. public const int ValuesFieldNumber = 3;
  175. private static readonly pbc::MapField<string, pb::ByteString>.Codec _map_values_codec
  176. = new pbc::MapField<string, pb::ByteString>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForBytes(18), 26);
  177. private readonly pbc::MapField<string, pb::ByteString> values_ = new pbc::MapField<string, pb::ByteString>();
  178. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  179. public pbc::MapField<string, pb::ByteString> Values {
  180. get { return values_; }
  181. }
  182. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  183. public override bool Equals(object other) {
  184. return Equals(other as RestoreResponse);
  185. }
  186. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  187. public bool Equals(RestoreResponse other) {
  188. if (ReferenceEquals(other, null)) {
  189. return false;
  190. }
  191. if (ReferenceEquals(other, this)) {
  192. return true;
  193. }
  194. if(!users_.Equals(other.users_)) return false;
  195. if (Step != other.Step) return false;
  196. if (!Values.Equals(other.Values)) return false;
  197. return true;
  198. }
  199. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  200. public override int GetHashCode() {
  201. int hash = 1;
  202. hash ^= users_.GetHashCode();
  203. if (Step != 0L) hash ^= Step.GetHashCode();
  204. hash ^= Values.GetHashCode();
  205. return hash;
  206. }
  207. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  208. public override string ToString() {
  209. return pb::JsonFormatter.ToDiagnosticString(this);
  210. }
  211. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  212. public void WriteTo(pb::CodedOutputStream output) {
  213. users_.WriteTo(output, _repeated_users_codec);
  214. if (Step != 0L) {
  215. output.WriteRawTag(16);
  216. output.WriteInt64(Step);
  217. }
  218. values_.WriteTo(output, _map_values_codec);
  219. }
  220. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  221. public int CalculateSize() {
  222. int size = 0;
  223. size += users_.CalculateSize(_repeated_users_codec);
  224. if (Step != 0L) {
  225. size += 1 + pb::CodedOutputStream.ComputeInt64Size(Step);
  226. }
  227. size += values_.CalculateSize(_map_values_codec);
  228. return size;
  229. }
  230. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  231. public void MergeFrom(RestoreResponse other) {
  232. if (other == null) {
  233. return;
  234. }
  235. users_.Add(other.users_);
  236. if (other.Step != 0L) {
  237. Step = other.Step;
  238. }
  239. values_.Add(other.values_);
  240. }
  241. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  242. public void MergeFrom(pb::CodedInputStream input) {
  243. uint tag;
  244. while ((tag = input.ReadTag()) != 0) {
  245. switch(tag) {
  246. default:
  247. input.SkipLastField();
  248. break;
  249. case 10: {
  250. users_.AddEntriesFrom(input, _repeated_users_codec);
  251. break;
  252. }
  253. case 16: {
  254. Step = input.ReadInt64();
  255. break;
  256. }
  257. case 26: {
  258. values_.AddEntriesFrom(input, _map_values_codec);
  259. break;
  260. }
  261. }
  262. }
  263. }
  264. }
  265. /// <summary>
  266. /// 同步消息
  267. /// </summary>
  268. public sealed partial class SyncRequest : pb::IMessage<SyncRequest> {
  269. private static readonly pb::MessageParser<SyncRequest> _parser = new pb::MessageParser<SyncRequest>(() => new SyncRequest());
  270. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  271. public static pb::MessageParser<SyncRequest> Parser { get { return _parser; } }
  272. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  273. public static pbr::MessageDescriptor Descriptor {
  274. get { return global::Protos.SyncReflection.Descriptor.MessageTypes[2]; }
  275. }
  276. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  277. pbr::MessageDescriptor pb::IMessage.Descriptor {
  278. get { return Descriptor; }
  279. }
  280. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  281. public SyncRequest() {
  282. OnConstruction();
  283. }
  284. partial void OnConstruction();
  285. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  286. public SyncRequest(SyncRequest other) : this() {
  287. step_ = other.step_;
  288. values_ = other.values_.Clone();
  289. }
  290. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  291. public SyncRequest Clone() {
  292. return new SyncRequest(this);
  293. }
  294. /// <summary>Field number for the "Step" field.</summary>
  295. public const int StepFieldNumber = 1;
  296. private long step_;
  297. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  298. public long Step {
  299. get { return step_; }
  300. set {
  301. step_ = value;
  302. }
  303. }
  304. /// <summary>Field number for the "Values" field.</summary>
  305. public const int ValuesFieldNumber = 2;
  306. private static readonly pbc::MapField<string, pb::ByteString>.Codec _map_values_codec
  307. = new pbc::MapField<string, pb::ByteString>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForBytes(18), 18);
  308. private readonly pbc::MapField<string, pb::ByteString> values_ = new pbc::MapField<string, pb::ByteString>();
  309. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  310. public pbc::MapField<string, pb::ByteString> Values {
  311. get { return values_; }
  312. }
  313. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  314. public override bool Equals(object other) {
  315. return Equals(other as SyncRequest);
  316. }
  317. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  318. public bool Equals(SyncRequest other) {
  319. if (ReferenceEquals(other, null)) {
  320. return false;
  321. }
  322. if (ReferenceEquals(other, this)) {
  323. return true;
  324. }
  325. if (Step != other.Step) return false;
  326. if (!Values.Equals(other.Values)) return false;
  327. return true;
  328. }
  329. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  330. public override int GetHashCode() {
  331. int hash = 1;
  332. if (Step != 0L) hash ^= Step.GetHashCode();
  333. hash ^= Values.GetHashCode();
  334. return hash;
  335. }
  336. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  337. public override string ToString() {
  338. return pb::JsonFormatter.ToDiagnosticString(this);
  339. }
  340. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  341. public void WriteTo(pb::CodedOutputStream output) {
  342. if (Step != 0L) {
  343. output.WriteRawTag(8);
  344. output.WriteInt64(Step);
  345. }
  346. values_.WriteTo(output, _map_values_codec);
  347. }
  348. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  349. public int CalculateSize() {
  350. int size = 0;
  351. if (Step != 0L) {
  352. size += 1 + pb::CodedOutputStream.ComputeInt64Size(Step);
  353. }
  354. size += values_.CalculateSize(_map_values_codec);
  355. return size;
  356. }
  357. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  358. public void MergeFrom(SyncRequest other) {
  359. if (other == null) {
  360. return;
  361. }
  362. if (other.Step != 0L) {
  363. Step = other.Step;
  364. }
  365. values_.Add(other.values_);
  366. }
  367. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  368. public void MergeFrom(pb::CodedInputStream input) {
  369. uint tag;
  370. while ((tag = input.ReadTag()) != 0) {
  371. switch(tag) {
  372. default:
  373. input.SkipLastField();
  374. break;
  375. case 8: {
  376. Step = input.ReadInt64();
  377. break;
  378. }
  379. case 18: {
  380. values_.AddEntriesFrom(input, _map_values_codec);
  381. break;
  382. }
  383. }
  384. }
  385. }
  386. }
  387. /// <summary>
  388. /// 同步消息响应
  389. /// </summary>
  390. public sealed partial class SyncResponse : pb::IMessage<SyncResponse> {
  391. private static readonly pb::MessageParser<SyncResponse> _parser = new pb::MessageParser<SyncResponse>(() => new SyncResponse());
  392. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  393. public static pb::MessageParser<SyncResponse> Parser { get { return _parser; } }
  394. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  395. public static pbr::MessageDescriptor Descriptor {
  396. get { return global::Protos.SyncReflection.Descriptor.MessageTypes[3]; }
  397. }
  398. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  399. pbr::MessageDescriptor pb::IMessage.Descriptor {
  400. get { return Descriptor; }
  401. }
  402. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  403. public SyncResponse() {
  404. OnConstruction();
  405. }
  406. partial void OnConstruction();
  407. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  408. public SyncResponse(SyncResponse other) : this() {
  409. status_ = other.status_;
  410. step_ = other.step_;
  411. values_ = other.values_.Clone();
  412. }
  413. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  414. public SyncResponse Clone() {
  415. return new SyncResponse(this);
  416. }
  417. /// <summary>Field number for the "Status" field.</summary>
  418. public const int StatusFieldNumber = 1;
  419. private bool status_;
  420. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  421. public bool Status {
  422. get { return status_; }
  423. set {
  424. status_ = value;
  425. }
  426. }
  427. /// <summary>Field number for the "Step" field.</summary>
  428. public const int StepFieldNumber = 2;
  429. private long step_;
  430. /// <summary>
  431. /// status=false时才有值
  432. /// </summary>
  433. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  434. public long Step {
  435. get { return step_; }
  436. set {
  437. step_ = value;
  438. }
  439. }
  440. /// <summary>Field number for the "Values" field.</summary>
  441. public const int ValuesFieldNumber = 3;
  442. private static readonly pbc::MapField<string, pb::ByteString>.Codec _map_values_codec
  443. = new pbc::MapField<string, pb::ByteString>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForBytes(18), 26);
  444. private readonly pbc::MapField<string, pb::ByteString> values_ = new pbc::MapField<string, pb::ByteString>();
  445. /// <summary>
  446. /// status=false时才有值
  447. /// </summary>
  448. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  449. public pbc::MapField<string, pb::ByteString> Values {
  450. get { return values_; }
  451. }
  452. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  453. public override bool Equals(object other) {
  454. return Equals(other as SyncResponse);
  455. }
  456. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  457. public bool Equals(SyncResponse other) {
  458. if (ReferenceEquals(other, null)) {
  459. return false;
  460. }
  461. if (ReferenceEquals(other, this)) {
  462. return true;
  463. }
  464. if (Status != other.Status) return false;
  465. if (Step != other.Step) return false;
  466. if (!Values.Equals(other.Values)) return false;
  467. return true;
  468. }
  469. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  470. public override int GetHashCode() {
  471. int hash = 1;
  472. if (Status != false) hash ^= Status.GetHashCode();
  473. if (Step != 0L) hash ^= Step.GetHashCode();
  474. hash ^= Values.GetHashCode();
  475. return hash;
  476. }
  477. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  478. public override string ToString() {
  479. return pb::JsonFormatter.ToDiagnosticString(this);
  480. }
  481. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  482. public void WriteTo(pb::CodedOutputStream output) {
  483. if (Status != false) {
  484. output.WriteRawTag(8);
  485. output.WriteBool(Status);
  486. }
  487. if (Step != 0L) {
  488. output.WriteRawTag(16);
  489. output.WriteInt64(Step);
  490. }
  491. values_.WriteTo(output, _map_values_codec);
  492. }
  493. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  494. public int CalculateSize() {
  495. int size = 0;
  496. if (Status != false) {
  497. size += 1 + 1;
  498. }
  499. if (Step != 0L) {
  500. size += 1 + pb::CodedOutputStream.ComputeInt64Size(Step);
  501. }
  502. size += values_.CalculateSize(_map_values_codec);
  503. return size;
  504. }
  505. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  506. public void MergeFrom(SyncResponse other) {
  507. if (other == null) {
  508. return;
  509. }
  510. if (other.Status != false) {
  511. Status = other.Status;
  512. }
  513. if (other.Step != 0L) {
  514. Step = other.Step;
  515. }
  516. values_.Add(other.values_);
  517. }
  518. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  519. public void MergeFrom(pb::CodedInputStream input) {
  520. uint tag;
  521. while ((tag = input.ReadTag()) != 0) {
  522. switch(tag) {
  523. default:
  524. input.SkipLastField();
  525. break;
  526. case 8: {
  527. Status = input.ReadBool();
  528. break;
  529. }
  530. case 16: {
  531. Step = input.ReadInt64();
  532. break;
  533. }
  534. case 26: {
  535. values_.AddEntriesFrom(input, _map_values_codec);
  536. break;
  537. }
  538. }
  539. }
  540. }
  541. }
  542. /// <summary>
  543. /// 同步消息推送
  544. /// </summary>
  545. public sealed partial class SyncPush : pb::IMessage<SyncPush> {
  546. private static readonly pb::MessageParser<SyncPush> _parser = new pb::MessageParser<SyncPush>(() => new SyncPush());
  547. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  548. public static pb::MessageParser<SyncPush> Parser { get { return _parser; } }
  549. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  550. public static pbr::MessageDescriptor Descriptor {
  551. get { return global::Protos.SyncReflection.Descriptor.MessageTypes[4]; }
  552. }
  553. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  554. pbr::MessageDescriptor pb::IMessage.Descriptor {
  555. get { return Descriptor; }
  556. }
  557. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  558. public SyncPush() {
  559. OnConstruction();
  560. }
  561. partial void OnConstruction();
  562. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  563. public SyncPush(SyncPush other) : this() {
  564. step_ = other.step_;
  565. values_ = other.values_.Clone();
  566. }
  567. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  568. public SyncPush Clone() {
  569. return new SyncPush(this);
  570. }
  571. /// <summary>Field number for the "Step" field.</summary>
  572. public const int StepFieldNumber = 1;
  573. private long step_;
  574. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  575. public long Step {
  576. get { return step_; }
  577. set {
  578. step_ = value;
  579. }
  580. }
  581. /// <summary>Field number for the "Values" field.</summary>
  582. public const int ValuesFieldNumber = 2;
  583. private static readonly pbc::MapField<string, pb::ByteString>.Codec _map_values_codec
  584. = new pbc::MapField<string, pb::ByteString>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForBytes(18), 18);
  585. private readonly pbc::MapField<string, pb::ByteString> values_ = new pbc::MapField<string, pb::ByteString>();
  586. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  587. public pbc::MapField<string, pb::ByteString> Values {
  588. get { return values_; }
  589. }
  590. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  591. public override bool Equals(object other) {
  592. return Equals(other as SyncPush);
  593. }
  594. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  595. public bool Equals(SyncPush other) {
  596. if (ReferenceEquals(other, null)) {
  597. return false;
  598. }
  599. if (ReferenceEquals(other, this)) {
  600. return true;
  601. }
  602. if (Step != other.Step) return false;
  603. if (!Values.Equals(other.Values)) return false;
  604. return true;
  605. }
  606. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  607. public override int GetHashCode() {
  608. int hash = 1;
  609. if (Step != 0L) hash ^= Step.GetHashCode();
  610. hash ^= Values.GetHashCode();
  611. return hash;
  612. }
  613. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  614. public override string ToString() {
  615. return pb::JsonFormatter.ToDiagnosticString(this);
  616. }
  617. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  618. public void WriteTo(pb::CodedOutputStream output) {
  619. if (Step != 0L) {
  620. output.WriteRawTag(8);
  621. output.WriteInt64(Step);
  622. }
  623. values_.WriteTo(output, _map_values_codec);
  624. }
  625. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  626. public int CalculateSize() {
  627. int size = 0;
  628. if (Step != 0L) {
  629. size += 1 + pb::CodedOutputStream.ComputeInt64Size(Step);
  630. }
  631. size += values_.CalculateSize(_map_values_codec);
  632. return size;
  633. }
  634. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  635. public void MergeFrom(SyncPush other) {
  636. if (other == null) {
  637. return;
  638. }
  639. if (other.Step != 0L) {
  640. Step = other.Step;
  641. }
  642. values_.Add(other.values_);
  643. }
  644. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  645. public void MergeFrom(pb::CodedInputStream input) {
  646. uint tag;
  647. while ((tag = input.ReadTag()) != 0) {
  648. switch(tag) {
  649. default:
  650. input.SkipLastField();
  651. break;
  652. case 8: {
  653. Step = input.ReadInt64();
  654. break;
  655. }
  656. case 18: {
  657. values_.AddEntriesFrom(input, _map_values_codec);
  658. break;
  659. }
  660. }
  661. }
  662. }
  663. }
  664. #endregion
  665. }
  666. #endregion Designer generated code