FunctionDto.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System.Collections.Generic;
  2. using System.Linq;
  3. using IwbZero.IwbBase;
  4. using WeEngine.Functions;
  5. namespace WeEngine.Application.Packages.Dto
  6. {
  7. public class FunctionDto:IIwbId
  8. {
  9. public FunctionDto(ExprFunction eFun)
  10. {
  11. Id = eFun.Id;
  12. Name = eFun.FunctionName;
  13. Description = eFun.FunctionDesc;
  14. Params = new List<FunParamDto>();
  15. if (eFun.Params != null && eFun.Params.Any())
  16. {
  17. foreach (var eFunParam in eFun.Params)
  18. {
  19. Params.Add(new FunParamDto()
  20. {
  21. Index =eFunParam.Index,
  22. ParamName = eFunParam.Name,
  23. ParamType = eFunParam.ExprType
  24. });
  25. }
  26. }
  27. }
  28. public string Id { get; set; }
  29. public string Name { get; set; }
  30. public string Description { get; set; }
  31. public List<FunParamDto> Params { get; set; }
  32. }
  33. public class FunParamDto
  34. {
  35. public int Index { get; set; }
  36. public string ParamName { get; set; }
  37. public string ParamType { get; set; }
  38. }
  39. }