ApiProxyGenerationOptions.cs 879 B

123456789101112131415161718192021222324252627282930313233
  1. using System.Collections.Generic;
  2. using Abp.Collections.Extensions;
  3. namespace Abp.Web.Api.ProxyScripting
  4. {
  5. public class ApiProxyGenerationOptions
  6. {
  7. public string GeneratorType { get; set; }
  8. public bool UseCache { get; set; }
  9. public string[] Modules { get; set; }
  10. public string[] Controllers { get; set; }
  11. public string[] Actions { get; set; }
  12. public IDictionary<string, string> Properties { get; set; }
  13. public ApiProxyGenerationOptions(string generatorType, bool useCache = true)
  14. {
  15. GeneratorType = generatorType;
  16. UseCache = useCache;
  17. Properties = new Dictionary<string, string>();
  18. }
  19. public bool IsPartialRequest()
  20. {
  21. return !(Modules.IsNullOrEmpty() && Controllers.IsNullOrEmpty() && Actions.IsNullOrEmpty());
  22. }
  23. }
  24. }