Math.cs 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: math.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 Math {
  10. /// <summary>Holder for reflection information generated from math.proto</summary>
  11. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  12. public static partial class MathReflection {
  13. #region Descriptor
  14. /// <summary>File descriptor for math.proto</summary>
  15. public static pbr::FileDescriptor Descriptor {
  16. get { return descriptor; }
  17. }
  18. private static pbr::FileDescriptor descriptor;
  19. static MathReflection() {
  20. byte[] descriptorData = global::System.Convert.FromBase64String(
  21. string.Concat(
  22. "CgptYXRoLnByb3RvEgRtYXRoIiwKB0RpdkFyZ3MSEAoIZGl2aWRlbmQYASAB",
  23. "KAMSDwoHZGl2aXNvchgCIAEoAyIvCghEaXZSZXBseRIQCghxdW90aWVudBgB",
  24. "IAEoAxIRCglyZW1haW5kZXIYAiABKAMiGAoHRmliQXJncxINCgVsaW1pdBgB",
  25. "IAEoAyISCgNOdW0SCwoDbnVtGAEgASgDIhkKCEZpYlJlcGx5Eg0KBWNvdW50",
  26. "GAEgASgDMqQBCgRNYXRoEiYKA0RpdhINLm1hdGguRGl2QXJncxoOLm1hdGgu",
  27. "RGl2UmVwbHkiABIuCgdEaXZNYW55Eg0ubWF0aC5EaXZBcmdzGg4ubWF0aC5E",
  28. "aXZSZXBseSIAKAEwARIjCgNGaWISDS5tYXRoLkZpYkFyZ3MaCS5tYXRoLk51",
  29. "bSIAMAESHwoDU3VtEgkubWF0aC5OdW0aCS5tYXRoLk51bSIAKAFiBnByb3Rv",
  30. "Mw=="));
  31. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  32. new pbr::FileDescriptor[] { },
  33. new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
  34. new pbr::GeneratedClrTypeInfo(typeof(global::Math.DivArgs), global::Math.DivArgs.Parser, new[]{ "Dividend", "Divisor" }, null, null, null),
  35. new pbr::GeneratedClrTypeInfo(typeof(global::Math.DivReply), global::Math.DivReply.Parser, new[]{ "Quotient", "Remainder" }, null, null, null),
  36. new pbr::GeneratedClrTypeInfo(typeof(global::Math.FibArgs), global::Math.FibArgs.Parser, new[]{ "Limit" }, null, null, null),
  37. new pbr::GeneratedClrTypeInfo(typeof(global::Math.Num), global::Math.Num.Parser, new[]{ "Num_" }, null, null, null),
  38. new pbr::GeneratedClrTypeInfo(typeof(global::Math.FibReply), global::Math.FibReply.Parser, new[]{ "Count" }, null, null, null)
  39. }));
  40. }
  41. #endregion
  42. }
  43. #region Messages
  44. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  45. public sealed partial class DivArgs : pb::IMessage<DivArgs> {
  46. private static readonly pb::MessageParser<DivArgs> _parser = new pb::MessageParser<DivArgs>(() => new DivArgs());
  47. public static pb::MessageParser<DivArgs> Parser { get { return _parser; } }
  48. public static pbr::MessageDescriptor Descriptor {
  49. get { return global::Math.MathReflection.Descriptor.MessageTypes[0]; }
  50. }
  51. pbr::MessageDescriptor pb::IMessage.Descriptor {
  52. get { return Descriptor; }
  53. }
  54. public DivArgs() {
  55. OnConstruction();
  56. }
  57. partial void OnConstruction();
  58. public DivArgs(DivArgs other) : this() {
  59. dividend_ = other.dividend_;
  60. divisor_ = other.divisor_;
  61. }
  62. public DivArgs Clone() {
  63. return new DivArgs(this);
  64. }
  65. /// <summary>Field number for the "dividend" field.</summary>
  66. public const int DividendFieldNumber = 1;
  67. private long dividend_;
  68. public long Dividend {
  69. get { return dividend_; }
  70. set {
  71. dividend_ = value;
  72. }
  73. }
  74. /// <summary>Field number for the "divisor" field.</summary>
  75. public const int DivisorFieldNumber = 2;
  76. private long divisor_;
  77. public long Divisor {
  78. get { return divisor_; }
  79. set {
  80. divisor_ = value;
  81. }
  82. }
  83. public override bool Equals(object other) {
  84. return Equals(other as DivArgs);
  85. }
  86. public bool Equals(DivArgs other) {
  87. if (ReferenceEquals(other, null)) {
  88. return false;
  89. }
  90. if (ReferenceEquals(other, this)) {
  91. return true;
  92. }
  93. if (Dividend != other.Dividend) return false;
  94. if (Divisor != other.Divisor) return false;
  95. return true;
  96. }
  97. public override int GetHashCode() {
  98. int hash = 1;
  99. if (Dividend != 0L) hash ^= Dividend.GetHashCode();
  100. if (Divisor != 0L) hash ^= Divisor.GetHashCode();
  101. return hash;
  102. }
  103. public override string ToString() {
  104. return pb::JsonFormatter.ToDiagnosticString(this);
  105. }
  106. public void WriteTo(pb::CodedOutputStream output) {
  107. if (Dividend != 0L) {
  108. output.WriteRawTag(8);
  109. output.WriteInt64(Dividend);
  110. }
  111. if (Divisor != 0L) {
  112. output.WriteRawTag(16);
  113. output.WriteInt64(Divisor);
  114. }
  115. }
  116. public int CalculateSize() {
  117. int size = 0;
  118. if (Dividend != 0L) {
  119. size += 1 + pb::CodedOutputStream.ComputeInt64Size(Dividend);
  120. }
  121. if (Divisor != 0L) {
  122. size += 1 + pb::CodedOutputStream.ComputeInt64Size(Divisor);
  123. }
  124. return size;
  125. }
  126. public void MergeFrom(DivArgs other) {
  127. if (other == null) {
  128. return;
  129. }
  130. if (other.Dividend != 0L) {
  131. Dividend = other.Dividend;
  132. }
  133. if (other.Divisor != 0L) {
  134. Divisor = other.Divisor;
  135. }
  136. }
  137. public void MergeFrom(pb::CodedInputStream input) {
  138. uint tag;
  139. while ((tag = input.ReadTag()) != 0) {
  140. switch(tag) {
  141. default:
  142. input.SkipLastField();
  143. break;
  144. case 8: {
  145. Dividend = input.ReadInt64();
  146. break;
  147. }
  148. case 16: {
  149. Divisor = input.ReadInt64();
  150. break;
  151. }
  152. }
  153. }
  154. }
  155. }
  156. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  157. public sealed partial class DivReply : pb::IMessage<DivReply> {
  158. private static readonly pb::MessageParser<DivReply> _parser = new pb::MessageParser<DivReply>(() => new DivReply());
  159. public static pb::MessageParser<DivReply> Parser { get { return _parser; } }
  160. public static pbr::MessageDescriptor Descriptor {
  161. get { return global::Math.MathReflection.Descriptor.MessageTypes[1]; }
  162. }
  163. pbr::MessageDescriptor pb::IMessage.Descriptor {
  164. get { return Descriptor; }
  165. }
  166. public DivReply() {
  167. OnConstruction();
  168. }
  169. partial void OnConstruction();
  170. public DivReply(DivReply other) : this() {
  171. quotient_ = other.quotient_;
  172. remainder_ = other.remainder_;
  173. }
  174. public DivReply Clone() {
  175. return new DivReply(this);
  176. }
  177. /// <summary>Field number for the "quotient" field.</summary>
  178. public const int QuotientFieldNumber = 1;
  179. private long quotient_;
  180. public long Quotient {
  181. get { return quotient_; }
  182. set {
  183. quotient_ = value;
  184. }
  185. }
  186. /// <summary>Field number for the "remainder" field.</summary>
  187. public const int RemainderFieldNumber = 2;
  188. private long remainder_;
  189. public long Remainder {
  190. get { return remainder_; }
  191. set {
  192. remainder_ = value;
  193. }
  194. }
  195. public override bool Equals(object other) {
  196. return Equals(other as DivReply);
  197. }
  198. public bool Equals(DivReply other) {
  199. if (ReferenceEquals(other, null)) {
  200. return false;
  201. }
  202. if (ReferenceEquals(other, this)) {
  203. return true;
  204. }
  205. if (Quotient != other.Quotient) return false;
  206. if (Remainder != other.Remainder) return false;
  207. return true;
  208. }
  209. public override int GetHashCode() {
  210. int hash = 1;
  211. if (Quotient != 0L) hash ^= Quotient.GetHashCode();
  212. if (Remainder != 0L) hash ^= Remainder.GetHashCode();
  213. return hash;
  214. }
  215. public override string ToString() {
  216. return pb::JsonFormatter.ToDiagnosticString(this);
  217. }
  218. public void WriteTo(pb::CodedOutputStream output) {
  219. if (Quotient != 0L) {
  220. output.WriteRawTag(8);
  221. output.WriteInt64(Quotient);
  222. }
  223. if (Remainder != 0L) {
  224. output.WriteRawTag(16);
  225. output.WriteInt64(Remainder);
  226. }
  227. }
  228. public int CalculateSize() {
  229. int size = 0;
  230. if (Quotient != 0L) {
  231. size += 1 + pb::CodedOutputStream.ComputeInt64Size(Quotient);
  232. }
  233. if (Remainder != 0L) {
  234. size += 1 + pb::CodedOutputStream.ComputeInt64Size(Remainder);
  235. }
  236. return size;
  237. }
  238. public void MergeFrom(DivReply other) {
  239. if (other == null) {
  240. return;
  241. }
  242. if (other.Quotient != 0L) {
  243. Quotient = other.Quotient;
  244. }
  245. if (other.Remainder != 0L) {
  246. Remainder = other.Remainder;
  247. }
  248. }
  249. public void MergeFrom(pb::CodedInputStream input) {
  250. uint tag;
  251. while ((tag = input.ReadTag()) != 0) {
  252. switch(tag) {
  253. default:
  254. input.SkipLastField();
  255. break;
  256. case 8: {
  257. Quotient = input.ReadInt64();
  258. break;
  259. }
  260. case 16: {
  261. Remainder = input.ReadInt64();
  262. break;
  263. }
  264. }
  265. }
  266. }
  267. }
  268. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  269. public sealed partial class FibArgs : pb::IMessage<FibArgs> {
  270. private static readonly pb::MessageParser<FibArgs> _parser = new pb::MessageParser<FibArgs>(() => new FibArgs());
  271. public static pb::MessageParser<FibArgs> Parser { get { return _parser; } }
  272. public static pbr::MessageDescriptor Descriptor {
  273. get { return global::Math.MathReflection.Descriptor.MessageTypes[2]; }
  274. }
  275. pbr::MessageDescriptor pb::IMessage.Descriptor {
  276. get { return Descriptor; }
  277. }
  278. public FibArgs() {
  279. OnConstruction();
  280. }
  281. partial void OnConstruction();
  282. public FibArgs(FibArgs other) : this() {
  283. limit_ = other.limit_;
  284. }
  285. public FibArgs Clone() {
  286. return new FibArgs(this);
  287. }
  288. /// <summary>Field number for the "limit" field.</summary>
  289. public const int LimitFieldNumber = 1;
  290. private long limit_;
  291. public long Limit {
  292. get { return limit_; }
  293. set {
  294. limit_ = value;
  295. }
  296. }
  297. public override bool Equals(object other) {
  298. return Equals(other as FibArgs);
  299. }
  300. public bool Equals(FibArgs other) {
  301. if (ReferenceEquals(other, null)) {
  302. return false;
  303. }
  304. if (ReferenceEquals(other, this)) {
  305. return true;
  306. }
  307. if (Limit != other.Limit) return false;
  308. return true;
  309. }
  310. public override int GetHashCode() {
  311. int hash = 1;
  312. if (Limit != 0L) hash ^= Limit.GetHashCode();
  313. return hash;
  314. }
  315. public override string ToString() {
  316. return pb::JsonFormatter.ToDiagnosticString(this);
  317. }
  318. public void WriteTo(pb::CodedOutputStream output) {
  319. if (Limit != 0L) {
  320. output.WriteRawTag(8);
  321. output.WriteInt64(Limit);
  322. }
  323. }
  324. public int CalculateSize() {
  325. int size = 0;
  326. if (Limit != 0L) {
  327. size += 1 + pb::CodedOutputStream.ComputeInt64Size(Limit);
  328. }
  329. return size;
  330. }
  331. public void MergeFrom(FibArgs other) {
  332. if (other == null) {
  333. return;
  334. }
  335. if (other.Limit != 0L) {
  336. Limit = other.Limit;
  337. }
  338. }
  339. public void MergeFrom(pb::CodedInputStream input) {
  340. uint tag;
  341. while ((tag = input.ReadTag()) != 0) {
  342. switch(tag) {
  343. default:
  344. input.SkipLastField();
  345. break;
  346. case 8: {
  347. Limit = input.ReadInt64();
  348. break;
  349. }
  350. }
  351. }
  352. }
  353. }
  354. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  355. public sealed partial class Num : pb::IMessage<Num> {
  356. private static readonly pb::MessageParser<Num> _parser = new pb::MessageParser<Num>(() => new Num());
  357. public static pb::MessageParser<Num> Parser { get { return _parser; } }
  358. public static pbr::MessageDescriptor Descriptor {
  359. get { return global::Math.MathReflection.Descriptor.MessageTypes[3]; }
  360. }
  361. pbr::MessageDescriptor pb::IMessage.Descriptor {
  362. get { return Descriptor; }
  363. }
  364. public Num() {
  365. OnConstruction();
  366. }
  367. partial void OnConstruction();
  368. public Num(Num other) : this() {
  369. num_ = other.num_;
  370. }
  371. public Num Clone() {
  372. return new Num(this);
  373. }
  374. /// <summary>Field number for the "num" field.</summary>
  375. public const int Num_FieldNumber = 1;
  376. private long num_;
  377. public long Num_ {
  378. get { return num_; }
  379. set {
  380. num_ = value;
  381. }
  382. }
  383. public override bool Equals(object other) {
  384. return Equals(other as Num);
  385. }
  386. public bool Equals(Num other) {
  387. if (ReferenceEquals(other, null)) {
  388. return false;
  389. }
  390. if (ReferenceEquals(other, this)) {
  391. return true;
  392. }
  393. if (Num_ != other.Num_) return false;
  394. return true;
  395. }
  396. public override int GetHashCode() {
  397. int hash = 1;
  398. if (Num_ != 0L) hash ^= Num_.GetHashCode();
  399. return hash;
  400. }
  401. public override string ToString() {
  402. return pb::JsonFormatter.ToDiagnosticString(this);
  403. }
  404. public void WriteTo(pb::CodedOutputStream output) {
  405. if (Num_ != 0L) {
  406. output.WriteRawTag(8);
  407. output.WriteInt64(Num_);
  408. }
  409. }
  410. public int CalculateSize() {
  411. int size = 0;
  412. if (Num_ != 0L) {
  413. size += 1 + pb::CodedOutputStream.ComputeInt64Size(Num_);
  414. }
  415. return size;
  416. }
  417. public void MergeFrom(Num other) {
  418. if (other == null) {
  419. return;
  420. }
  421. if (other.Num_ != 0L) {
  422. Num_ = other.Num_;
  423. }
  424. }
  425. public void MergeFrom(pb::CodedInputStream input) {
  426. uint tag;
  427. while ((tag = input.ReadTag()) != 0) {
  428. switch(tag) {
  429. default:
  430. input.SkipLastField();
  431. break;
  432. case 8: {
  433. Num_ = input.ReadInt64();
  434. break;
  435. }
  436. }
  437. }
  438. }
  439. }
  440. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  441. public sealed partial class FibReply : pb::IMessage<FibReply> {
  442. private static readonly pb::MessageParser<FibReply> _parser = new pb::MessageParser<FibReply>(() => new FibReply());
  443. public static pb::MessageParser<FibReply> Parser { get { return _parser; } }
  444. public static pbr::MessageDescriptor Descriptor {
  445. get { return global::Math.MathReflection.Descriptor.MessageTypes[4]; }
  446. }
  447. pbr::MessageDescriptor pb::IMessage.Descriptor {
  448. get { return Descriptor; }
  449. }
  450. public FibReply() {
  451. OnConstruction();
  452. }
  453. partial void OnConstruction();
  454. public FibReply(FibReply other) : this() {
  455. count_ = other.count_;
  456. }
  457. public FibReply Clone() {
  458. return new FibReply(this);
  459. }
  460. /// <summary>Field number for the "count" field.</summary>
  461. public const int CountFieldNumber = 1;
  462. private long count_;
  463. public long Count {
  464. get { return count_; }
  465. set {
  466. count_ = value;
  467. }
  468. }
  469. public override bool Equals(object other) {
  470. return Equals(other as FibReply);
  471. }
  472. public bool Equals(FibReply other) {
  473. if (ReferenceEquals(other, null)) {
  474. return false;
  475. }
  476. if (ReferenceEquals(other, this)) {
  477. return true;
  478. }
  479. if (Count != other.Count) return false;
  480. return true;
  481. }
  482. public override int GetHashCode() {
  483. int hash = 1;
  484. if (Count != 0L) hash ^= Count.GetHashCode();
  485. return hash;
  486. }
  487. public override string ToString() {
  488. return pb::JsonFormatter.ToDiagnosticString(this);
  489. }
  490. public void WriteTo(pb::CodedOutputStream output) {
  491. if (Count != 0L) {
  492. output.WriteRawTag(8);
  493. output.WriteInt64(Count);
  494. }
  495. }
  496. public int CalculateSize() {
  497. int size = 0;
  498. if (Count != 0L) {
  499. size += 1 + pb::CodedOutputStream.ComputeInt64Size(Count);
  500. }
  501. return size;
  502. }
  503. public void MergeFrom(FibReply other) {
  504. if (other == null) {
  505. return;
  506. }
  507. if (other.Count != 0L) {
  508. Count = other.Count;
  509. }
  510. }
  511. public void MergeFrom(pb::CodedInputStream input) {
  512. uint tag;
  513. while ((tag = input.ReadTag()) != 0) {
  514. switch(tag) {
  515. default:
  516. input.SkipLastField();
  517. break;
  518. case 8: {
  519. Count = input.ReadInt64();
  520. break;
  521. }
  522. }
  523. }
  524. }
  525. }
  526. #endregion
  527. }
  528. #endregion Designer generated code