Invocation.cs 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #if !BESTHTTP_DISABLE_SIGNALR_CORE
  2. using System;
  3. namespace BestHTTP.SignalRCore.Messages
  4. {
  5. [PlatformSupport.IL2CPP.Preserve]
  6. public struct Completion
  7. {
  8. [PlatformSupport.IL2CPP.Preserve] public MessageTypes type;
  9. [PlatformSupport.IL2CPP.Preserve] public string invocationId;
  10. }
  11. [PlatformSupport.IL2CPP.Preserve]
  12. public struct CompletionWithResult
  13. {
  14. [PlatformSupport.IL2CPP.Preserve] public MessageTypes type;
  15. [PlatformSupport.IL2CPP.Preserve] public string invocationId;
  16. [PlatformSupport.IL2CPP.Preserve] public object result;
  17. }
  18. [PlatformSupport.IL2CPP.Preserve]
  19. public struct CompletionWithError
  20. {
  21. [PlatformSupport.IL2CPP.Preserve] public MessageTypes type;
  22. [PlatformSupport.IL2CPP.Preserve] public string invocationId;
  23. [PlatformSupport.IL2CPP.Preserve] public string error;
  24. }
  25. [PlatformSupport.IL2CPP.Preserve]
  26. public struct StreamItemMessage
  27. {
  28. [PlatformSupport.IL2CPP.Preserve] public MessageTypes type;
  29. [PlatformSupport.IL2CPP.Preserve] public string invocationId;
  30. [PlatformSupport.IL2CPP.Preserve] public object item;
  31. }
  32. [PlatformSupport.IL2CPP.Preserve]
  33. public struct InvocationMessage
  34. {
  35. [PlatformSupport.IL2CPP.Preserve] public MessageTypes type;
  36. [PlatformSupport.IL2CPP.Preserve] public string invocationId;
  37. [PlatformSupport.IL2CPP.Preserve] public bool nonblocking;
  38. [PlatformSupport.IL2CPP.Preserve] public string target;
  39. [PlatformSupport.IL2CPP.Preserve] public object[] arguments;
  40. }
  41. [PlatformSupport.IL2CPP.Preserve]
  42. public struct UploadInvocationMessage
  43. {
  44. [PlatformSupport.IL2CPP.Preserve] public MessageTypes type;
  45. [PlatformSupport.IL2CPP.Preserve] public string invocationId;
  46. [PlatformSupport.IL2CPP.Preserve] public bool nonblocking;
  47. [PlatformSupport.IL2CPP.Preserve] public string target;
  48. [PlatformSupport.IL2CPP.Preserve] public object[] arguments;
  49. [PlatformSupport.IL2CPP.Preserve] public string[] streamIds;
  50. }
  51. [PlatformSupport.IL2CPP.Preserve]
  52. public struct CancelInvocationMessage
  53. {
  54. [PlatformSupport.IL2CPP.Preserve] public MessageTypes type { get { return MessageTypes.CancelInvocation; } }
  55. [PlatformSupport.IL2CPP.Preserve] public string invocationId;
  56. }
  57. [PlatformSupport.IL2CPP.Preserve]
  58. public struct PingMessage
  59. {
  60. [PlatformSupport.IL2CPP.Preserve] public MessageTypes type { get { return MessageTypes.Ping; } }
  61. }
  62. [PlatformSupport.IL2CPP.Preserve]
  63. public struct CloseMessage
  64. {
  65. [PlatformSupport.IL2CPP.Preserve] public MessageTypes type { get { return MessageTypes.Close; } }
  66. }
  67. [PlatformSupport.IL2CPP.Preserve]
  68. public struct CloseWithErrorMessage
  69. {
  70. [PlatformSupport.IL2CPP.Preserve] public MessageTypes type { get { return MessageTypes.Close; } }
  71. [PlatformSupport.IL2CPP.Preserve] public string error;
  72. }
  73. }
  74. #endif