IntMath.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. using EasyRpc.Interfaces;
  2. using Newtonsoft.Json.Linq;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text.Json;
  7. using System.Threading.Tasks;
  8. namespace EasyRpc.Services
  9. {
  10. public class Item
  11. {
  12. public int a { get; set; }
  13. public int b { get; set; }
  14. }
  15. public class IntMath// : IIntMath
  16. {
  17. /// <summary>
  18. /// Add to integers together
  19. /// hello tanya
  20. /// </summary>
  21. /// <param name="x">first integer</param>
  22. /// <param name="y">second integer</param>
  23. /// <returns></returns>
  24. public int Add(int x, int y)
  25. {
  26. return x + y;
  27. }
  28. /// <summary>
  29. /// Subtract to integers together
  30. /// </summary>
  31. /// <param name="x">first integer</param>
  32. /// <param name="y">second integer</param>
  33. /// <returns></returns>
  34. public int Subtract(Item item ,Dictionary<string,int > dict)
  35. {
  36. return 5;
  37. }
  38. /// <summary>
  39. /// Multiply to integers together
  40. /// </summary>
  41. /// <param name="x">first integer</param>
  42. /// <param name="y">second integer</param>
  43. /// <returns></returns>
  44. public int Multiply(int x, int y)
  45. {
  46. return x * y;
  47. }
  48. /// <summary>
  49. /// Divide to integers together
  50. /// </summary>
  51. /// <param name="x">first integer</param>
  52. /// <param name="y">second integer</param>
  53. /// <returns></returns>
  54. public int Divide(int x, int y)
  55. {
  56. return x / y;
  57. }
  58. }
  59. }