WebReportOptions.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #if !WASM
  2. using FastReport.Web.Cache;
  3. #endif
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Net.Http;
  7. using System.Text;
  8. namespace FastReport.Web
  9. {
  10. public sealed class WebReportOptions
  11. {
  12. #if !WASM
  13. public CacheOptions CacheOptions { get; set; } = new CacheOptions();
  14. /// <summary>
  15. /// SMTP server settings for sending the report by e-mail
  16. /// </summary>
  17. public EmailExportOptions EmailExportOptions { get; set; } = null;
  18. /// <summary>
  19. /// Gets or sets a value indicating whether custom SQL queries can be executed.
  20. /// When set to true, users will be able to specify custom table names and SQL expressions
  21. /// during the database structure loading process.
  22. /// <para>
  23. /// WARNING: Enabling this option may pose security risks.
  24. /// </para>
  25. /// </summary>
  26. public bool AllowCustomSqlQueries { get; set; } = false;
  27. #else
  28. /// <summary>
  29. /// Used to access .NET libraries to compile the report script
  30. /// </summary>
  31. /// <example>
  32. /// <code>
  33. /// options.HttpClient = new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
  34. /// </code>
  35. /// </example>
  36. public HttpClient? HttpClient { get; set; }
  37. #endif
  38. }
  39. }