JsonRpcObject.cs 907 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using RawRabbit.Configuration.Exchange;
  5. using RawRabbit.Enrichers.Attributes;
  6. namespace Applications.PumpInfoToRemote
  7. {
  8. public abstract class JsonRpcObject
  9. {
  10. public string JsonRpc => "2.0";
  11. public string Method { get; set; }
  12. public List<JsonRpcObjectMethodParameter> Params { get; set; }
  13. }
  14. public class JsonRpcObjectMethodParameter
  15. {
  16. public string Name { get; set; }
  17. public string Value { get; set; }
  18. }
  19. public class NotificationRpc : JsonRpcObject
  20. {
  21. }
  22. public class NotificationResponse : JsonRpcObject
  23. {
  24. }
  25. public class ResponseRpc : JsonRpcObject
  26. {
  27. public int Id { get; set; }
  28. public string Result { get; set; }
  29. }
  30. public class RequestRpc : JsonRpcObject
  31. {
  32. public int Id { get; set; }
  33. }
  34. }