Configuration.cs 864 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using Newtonsoft.Json;
  3. using EdjCase.JsonRpc.Router.Abstractions;
  4. namespace EdjCase.JsonRpc.Router
  5. {
  6. /// <summary>
  7. /// Configuration data for the Rpc server that is shared between all middlewares
  8. /// </summary>
  9. public class RpcServerConfiguration
  10. {
  11. /// <summary>
  12. /// Json serialization settings that will be used in serialization and deserialization
  13. /// for rpc requests
  14. /// </summary>
  15. public JsonSerializerSettings JsonSerializerSettings { get; set; }
  16. /// <summary>
  17. /// If true will show exception messages that the server rpc methods throw. Defaults to false
  18. /// </summary>
  19. public bool ShowServerExceptions { get; set; }
  20. /// <summary>
  21. /// If specified the router will throw an error if there is a batch request count
  22. /// greater than the limit
  23. /// </summary>
  24. public int? BatchRequestLimit { get; set; }
  25. }
  26. }