IRpcMethodResult.cs 647 B

12345678910111213141516171819202122
  1. using EdjCase.JsonRpc.Core;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Threading.Tasks;
  6. namespace EdjCase.JsonRpc.Router.Abstractions
  7. {
  8. /// <summary>
  9. /// Rpc method response object that allows the server to customize an rpc response
  10. /// </summary>
  11. public interface IRpcMethodResult
  12. {
  13. /// <summary>
  14. /// Turns result data into a rpc response
  15. /// </summary>
  16. /// <param name="id">Rpc request id</param>
  17. /// <param name="serializer">Json serializer function to use for objects for the response</param>
  18. /// <returns>Rpc response for request</returns>
  19. RpcResponse ToRpcResponse(RpcId id);
  20. }
  21. }